diff --git a/inc/display.h b/inc/display.h index 8cf86b48..d18469ef 100644 --- a/inc/display.h +++ b/inc/display.h @@ -31,10 +31,10 @@ extern uint8_t ScreenBuffer[]; extern const image_t **Images; -extern const image_t const *font0_1306[]; -extern const image_t const *font0_1327[]; -extern const image_t const *font1_1306[]; -extern const image_t const *font1_1327[]; +extern const image_t *font0_1306[]; +extern const image_t *font0_1327[]; +extern const image_t *font1_1306[]; +extern const image_t *font1_1327[]; //------------------------------------------------------------------------- diff --git a/src/battery.c b/src/battery.c index 2ba1d5b1..809f3102 100644 --- a/src/battery.c +++ b/src/battery.c @@ -55,7 +55,7 @@ const Battery_t BatteryRXMini = 20 }; -const Battery_t const Batteries[] = +const Battery_t Batteries[] = { // Generic 18650 { diff --git a/src/fonts.c b/src/fonts.c index a21e759e..51f0291b 100644 --- a/src/fonts.c +++ b/src/fonts.c @@ -225,7 +225,7 @@ const image_t f0img1306_00FD = { 6, 8, { 0, 8, 8, 8, 8, 8 } }; const image_t f0img1306_00FE = { 64, 64, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 224, 128, 0, 0, 0, 0, 0, 0, 0, 2, 204, 48, 48, 204, 2, 0, 0, 2, 254, 2, 254, 2, 0, 0, 0, 0, 0, 0, 0, 128, 224, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 6, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 6, 12, 8, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; -const image_t const *font0_1306[] __block1__ = +const image_t *font0_1306[] __block1__ = { &f0img1306_0001, &f0img1306_0002, @@ -665,7 +665,7 @@ const image_t f1img1306_00F7 = { 5, 24, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, //const image_t f1img1306_00FE = { 12, 40, { 0, 254, 253, 251, 7, 7, 7, 7, 251, 253, 254, 0, 0, 15, 151, 155, 156, 156, 156, 156, 155, 151, 143, 0, 0, 255, 254, 253, 3, 3, 3, 3, 3, 1, 0, 0, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 191, 223, 224, 224, 224, 224, 224, 192, 128, 0 } }; const image_t f1img1306_00FE = { 64, 64, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 248, 0, 16, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 254, 0, 224, 18, 18, 18, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 224, 0, 192, 32, 32, 192, 0, 0, 0, 0, 0, 7, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 32, 32, 192, 0, 0, 0, 0, 0, 0, 0, 31, 0, 15, 16, 16, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 17, 17, 17, 0, 0, 0, 0, 0, 96, 144, 144, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 144, 144, 96, 0, 0, 0, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 7, 0, 0, 0, 0, 0, 176, 72, 72, 176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 128, 128, 120, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 4, 3, 0, 0, 0, 0, 0, 0, 32, 32, 32, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 32, 32, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59, 68, 68, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 17, 17, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; -const image_t const *font1_1306[] __block1__ = +const image_t *font1_1306[] __block1__ = { &f1img1306_0001, &f1img1306_0002, diff --git a/src/menus.c b/src/menus.c index e3eac027..6c533f72 100644 --- a/src/menus.c +++ b/src/menus.c @@ -76,7 +76,7 @@ struct mitem_s struct menu_s { const uint8_t* const caption; - const struct menu_s const *parent; + const struct menu_s *parent; void (*on_enter)(); void (*on_drawitem)( int mi, int y, int sel ); void (*on_selectitem)(); @@ -86,7 +86,7 @@ struct menu_s const mitem_t mitems[]; }; -const menu_t const *CurrentMenu; +const menu_t *CurrentMenu; uint8_t CurrentMenuItem; @@ -2527,7 +2527,7 @@ __myevic__ int MenuDataAction( int event, const mdata_t *data ) if ( *p == desc->def1 ) break; - *p += desc->inc * ( KeyTicks >= 105 ) ? 10 : 1; + *p += desc->inc && ( KeyTicks >= 105 ) ? 10 : 1; if ( *p > desc->max ) { @@ -2545,7 +2545,7 @@ __myevic__ int MenuDataAction( int event, const mdata_t *data ) if ( *p == desc->def1 ) break; - *p += desc->inc * ( KeyTicks >= 105 ) ? 10 : 1; + *p += desc->inc && ( KeyTicks >= 105 ) ? 10 : 1; if ( *p > desc->max ) { @@ -2563,7 +2563,7 @@ __myevic__ int MenuDataAction( int event, const mdata_t *data ) if ( *p == desc->def1 ) break; - *p += desc->inc * ( KeyTicks >= 105 ) ? 10 : 1; + *p += desc->inc && ( KeyTicks >= 105 ) ? 10 : 1; if ( *p > desc->max ) { @@ -2594,7 +2594,7 @@ __myevic__ int MenuDataAction( int event, const mdata_t *data ) if ( *p == desc->def1 ) break; - uint16_t inc = desc->inc * ( KeyTicks >= 105 ) ? 10 : 1; + uint16_t inc = desc->inc && ( KeyTicks >= 105 ) ? 10 : 1; if ( ( *p <= desc->min + inc ) || ( ( *p -= inc ) < desc->min ) ) { @@ -2612,7 +2612,7 @@ __myevic__ int MenuDataAction( int event, const mdata_t *data ) if ( *p == desc->def1 ) break; - uint16_t inc = desc->inc * ( KeyTicks >= 105 ) ? 10 : 1; + uint16_t inc = desc->inc && ( KeyTicks >= 105 ) ? 10 : 1; if ( ( *p -= inc ) < desc->min ) { @@ -2630,7 +2630,7 @@ __myevic__ int MenuDataAction( int event, const mdata_t *data ) if ( *p == desc->def1 ) break; - uint16_t inc = desc->inc * ( KeyTicks >= 105 ) ? 10 : 1; + uint16_t inc = desc->inc && ( KeyTicks >= 105 ) ? 10 : 1; if ( ( *p -= inc ) < desc->min ) { diff --git a/src/miscs.c b/src/miscs.c index baa0b734..5d3cd356 100644 --- a/src/miscs.c +++ b/src/miscs.c @@ -512,7 +512,7 @@ const obj3d_t isoca = isoca_lines }; -const obj3d_t const *objects3d[] = +const obj3d_t *objects3d[] = { &tetra, &cube,