diff -r 84c16ece8e10 -r a108677bd3d0 svghmi/svghmi.c --- a/svghmi/svghmi.c Fri Mar 06 14:43:03 2020 +0100 +++ b/svghmi/svghmi.c Mon Mar 09 13:40:45 2020 +0100 @@ -149,12 +149,12 @@ { printf("BUG!!! %%d + %%ld + %%d > %%ld \n", sbufidx, sizeof(uint32_t), sz, sizeof(sbuf)); AtomicCompareExchange(&dsc->wlock, 1, 0); - return EOVERFLOW; + return EOVERFLOW; } } AtomicCompareExchange(&dsc->wlock, 1, 0); - return 0; + return 0; } static int read_iterator(uint32_t index, hmi_tree_item_t *dsc) @@ -288,7 +288,7 @@ { uint32_t index = *(uint32_t*)(cursor); uint8_t const *valptr = cursor + sizeof(uint32_t); - + if(index == heartbeat_index) was_hearbeat = 1; @@ -316,12 +316,12 @@ AtomicCompareExchange(&dsc->rlock, 1, 0); progress = sz + sizeof(uint32_t) /* index */; } - else + else { return -EINVAL; } } - else + else { return -EINVAL; } @@ -345,12 +345,12 @@ hmi_tree_item_t *dsc = &hmi_tree_item[index]; update_refresh_period(dsc, refresh_period_ms); } - else + else { return -EINVAL; } - progress = sizeof(uint32_t) /* index */ + + progress = sizeof(uint32_t) /* index */ + sizeof(uint16_t) /* refresh period */; } break;