diff --git a/lib/ArduinoLog/ArduinoLog.h b/lib/ArduinoLog/ArduinoLog.h
index 5bdb4add..e2b670c5 100644
--- a/lib/ArduinoLog/ArduinoLog.h
+++ b/lib/ArduinoLog/ArduinoLog.h
@@ -286,7 +286,7 @@ class Logging {
{
#ifndef DISABLE_LOGGING
- for(uint8_t i = 0; i < 3; i++) {
+ for(int i = 0; i < 3; i++) {
if(_logOutput[i] == NULL || level > _level[i]) continue;
if(_prefix != NULL) {
diff --git a/lib/lv_lib_zifont/lv_zifont.cpp b/lib/lv_lib_zifont/lv_zifont.cpp
index 974fb393..1912b715 100644
--- a/lib/lv_lib_zifont/lv_zifont.cpp
+++ b/lib/lv_lib_zifont/lv_zifont.cpp
@@ -384,7 +384,7 @@ const uint8_t * IRAM_ATTR lv_font_get_bitmap_fmt_zifont(const lv_font_t * font,
break;
case(0b001):
- for(uint8_t i = 0; i < repeats; i++) { // repeats are black
+ for(int i = 0; i < repeats; i++) { // repeats are black
blackAdd(charBitmap_p, arrindex++);
}
break;
@@ -547,28 +547,16 @@ static void IRAM_ATTR blackAdd(uint8_t * charBitmap_p, uint16_t pos)
}
}
-static void IRAM_ATTR colorsAdd(uint8_t * charBitmap_p, uint8_t color1, uint16_t pos)
+static inline void IRAM_ATTR colorsAdd(uint8_t * charBitmap_p, uint8_t color1, uint16_t pos)
{
- uint8_t col = pos & 0x0001; // remainder
- uint16_t map_p = pos >> 1; // devide by 2
+ uint32_t col = pos & 0x0001; // remainder
+ uint32_t map_p = pos >> 1; // devide by 2
- // if(color1 == ColorBlack) {
- // // && color1 != ColorWhite) { // Don't check white, as the function is only used for colors
- // if(col == 0) {
- // charBitmap_p[map_p] = 0xf0;
- // } else {
- // charBitmap_p[map_p] |= color1;
- // }
- // } else {
- // Serial.printf("%u color %u\n", pos, color1);
if(col == 0) {
charBitmap_p[map_p] = color1 << 5;
} else {
charBitmap_p[map_p] |= color1 << 1;
}
- // }
-
- // return 1; // shift 1 position
}
/*
@@ -610,8 +598,8 @@ void printBuffer(uint8_t * charBitmap_p, uint8_t w, uint8_t h)
uint8_t cols = w + w % 2;
cols /= 2;
- for(uint8_t i = 0; i < h; i++) {
- for(uint8_t j = 0; j < cols; j++) {
+ for(int i = 0; i < h; i++) {
+ for(int j = 0; j < cols; j++) {
uint8_t b = charBitmap_p[i * cols + j];
printPixel(b >> 4);
printPixel(b & 0b1111);
diff --git a/platformio.ini b/platformio.ini
index f0e7418f..75d4ce7d 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -59,7 +59,7 @@ build_flags =
${override.build_flags}
-D HASP_VERSION_MAJOR=0
-D HASP_VERSION_MINOR=3
- -D HASP_VERSION_REVISION=1207
+ -D HASP_VERSION_REVISION=0
; -- Shared library dependencies in all environments
; Warning : don't put comments after github links => causes infinite download loop
diff --git a/src/hasp.cpp b/src/hasp.cpp
index ea92cb15..923113c1 100644
--- a/src/hasp.cpp
+++ b/src/hasp.cpp
@@ -395,7 +395,7 @@ void haspSetup()
// _lv_style_list_add_style(list, &pagefont);
/* Create all screens using the theme */
- for(uint8_t i = 0; i < (sizeof pages / sizeof *pages); i++) {
+ for(int i = 0; i < (sizeof pages / sizeof *pages); i++) {
pages[i] = lv_obj_create(NULL, NULL);
// list = lv_obj_get_style_list(pages[i], LV_OBJ_PART_MAIN);
// _lv_style_list_add_style(list, &pagefont);
diff --git a/src/hasp_attribute.cpp b/src/hasp_attribute.cpp
index 2a35ac67..628ca898 100644
--- a/src/hasp_attribute.cpp
+++ b/src/hasp_attribute.cpp
@@ -151,7 +151,7 @@ static bool attribute_lookup_lv_property(uint16_t hash, uint8_t * prop)
#endif
};
- for(uint8_t i = 0; i < sizeof(props) / sizeof(props[0]); i++) {
+ for(uint32_t i = 0; i < sizeof(props) / sizeof(props[0]); i++) {
if(props[i].hash == hash) {
*prop = props[1].prop;
Log.warning(TAG_ATTR, F("%d found and has propery %d"), hash, props[i].prop);
diff --git a/src/hasp_config.cpp b/src/hasp_config.cpp
index 99c184d1..4bb37968 100644
--- a/src/hasp_config.cpp
+++ b/src/hasp_config.cpp
@@ -346,7 +346,7 @@ void configSetup()
{
DynamicJsonDocument settings(1024 + 512);
- for(uint8_t i = 0; i < 2; i++) {
+ for(uint32_t i = 0; i < 2; i++) {
Serial.print(__FILE__);
Serial.println(__LINE__);
diff --git a/src/hasp_gpio.cpp b/src/hasp_gpio.cpp
index 080d25cc..08c34fdb 100644
--- a/src/hasp_gpio.cpp
+++ b/src/hasp_gpio.cpp
@@ -97,7 +97,7 @@ void aceButtonSetup(void)
void IRAM_ATTR gpioLoop(void)
{
// Should be called every 4-5ms or faster, for the default debouncing time of ~20ms.
- for(uint8_t i = 0; i < gpioUsedInputCount; i++) {
+ for(uint32_t i = 0; i < gpioUsedInputCount; i++) {
if(button[i]) button[i]->check();
}
}
@@ -172,7 +172,7 @@ void gpioSetup()
{
aceButtonSetup();
- for(uint8_t i = 0; i < HASP_NUM_GPIO_CONFIG; i++) {
+ for(uint32_t i = 0; i < HASP_NUM_GPIO_CONFIG; i++) {
uint8_t input_mode;
switch(gpioConfig[i].gpio_function) {
case OUTPUT:
@@ -256,7 +256,7 @@ void gpio_set_state(hasp_gpio_config_t gpio, bool state)
void gpio_set_group_state(uint8_t groupid, uint8_t eventid)
{
bool state = dispatch_get_event_state(eventid);
- for(uint8_t i = 0; i < HASP_NUM_GPIO_CONFIG; i++) {
+ for(uint32_t i = 0; i < HASP_NUM_GPIO_CONFIG; i++) {
if(gpioConfig[i].group == groupid) {
gpio_set_state(gpioConfig[i], state);
}
@@ -266,7 +266,7 @@ void gpio_set_group_state(uint8_t groupid, uint8_t eventid)
void gpio_set_gpio_state(uint8_t pin, uint8_t eventid)
{
bool state = dispatch_get_event_state(eventid);
- for(uint8_t i = 0; i < HASP_NUM_GPIO_CONFIG; i++) {
+ for(uint32_t i = 0; i < HASP_NUM_GPIO_CONFIG; i++) {
if(gpioConfig[i].pin == pin) {
gpio_set_state(gpioConfig[i], state);
return;
@@ -385,7 +385,7 @@ bool gpioIsSystemPin(uint8_t gpio)
bool gpioInUse(uint8_t gpio)
{
- for(uint8_t i = 0; i < HASP_NUM_GPIO_CONFIG; i++) {
+ for(uint32_t i = 0; i < HASP_NUM_GPIO_CONFIG; i++) {
if(gpioConfigInUse(i) && (gpioConfig[i].pin == gpio)) {
return true; // pin matches and is in use
}
@@ -461,7 +461,7 @@ bool gpioGetConfig(const JsonObject & settings)
/* Build new Gpio array if the count is not correct */
if(i != HASP_NUM_GPIO_CONFIG) {
array = settings[FPSTR(F_GPIO_CONFIG)].to
Group
"); @@ -1438,7 +1438,7 @@ void webHandleDebugConfig() httpMessage += F("'>Syslog Facility