fix(sprintf) add format string for rp2 port (#2512)
* fixes for rp2 port (only format strings: int/int32_t mismatch, %d -> %ld) * use portable PRId32 printf format, #include <inttypes.h> via lv_printf.h * define LV_PRId32 macro (for int) * figure out good way to build inside Micropython (plus indentation) * re-add examples (lost on the way) * hopefully fix PRI32d * Revert off CMakeLists.txt changes so that this is about printf only
This commit is contained in:
@@ -426,7 +426,7 @@ static void lv_spinbox_updatevalue(lv_obj_t * obj)
|
||||
int32_t i;
|
||||
char digits[LV_SPINBOX_MAX_DIGIT_COUNT + 4];
|
||||
/*Convert the numbers to string (the sign is already handled so always covert positive number)*/
|
||||
lv_snprintf(digits, sizeof(digits), "%d", LV_ABS(spinbox->value));
|
||||
lv_snprintf(digits, sizeof(digits), "%" LV_PRId32, LV_ABS(spinbox->value));
|
||||
|
||||
/*Add leading zeros*/
|
||||
int lz_cnt = spinbox->digit_count - (int)strlen(digits);
|
||||
|
||||
Reference in New Issue
Block a user