Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Commit

Permalink
Implemented virtual throttle. Added configuration to disable coast br…
Browse files Browse the repository at this point in the history
…ake as it was giving issues with throttle
  • Loading branch information
casainho committed Apr 30, 2020
1 parent 7b2bde9 commit 4da9167
Show file tree
Hide file tree
Showing 14 changed files with 223 additions and 77 deletions.
2 changes: 1 addition & 1 deletion firmware/860C_850C/src/1-Flash_Debug.launch
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<booleanAttribute key="org.eclipse.cdt.launch.ENABLE_REGISTER_BOOKKEEPING" value="false"/>
<booleanAttribute key="org.eclipse.cdt.launch.ENABLE_VARIABLE_BOOKKEEPING" value="false"/>
<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;contentList&gt;&lt;content id=&quot;ui8_rx[25]-ui8_rx-USART1_IRQHandler-(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;ui8_rx[24]-ui8_rx-USART1_IRQHandler-(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;ui32_address-eeprom_write-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;p_var_number-p_lcd_var_number-item_var_set_strings-(cast)&quot; val=&quot;uint8_t&quot;/&gt;&lt;content id=&quot;p_var_number-p_lcd_var_number-item_var_set_number-(cast_to_array)&quot; val=&quot;0:4&quot;/&gt;&lt;content id=&quot;ui8_rx_buffer[24]-ui8_rx_buffer--(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;*p_rx_buffer-p_rx_buffer-layer_2-(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;ui32_color-UG_PutChar-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;ui8_previous_digits_array[1]-ui8_previous_digits_array-number-lcd_print_number-(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;ui8_previous_digits_array[0]-ui8_previous_digits_array-number-lcd_print_number-(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;ui8_digits_array[1]-ui8_digits_array-lcd_print_number-(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;ui8_digits_array[0]-ui8_digits_array-lcd_print_number-(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;ui8_minutes-p_rtc_time-display_time_minutes-(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;ui8_minutes-p_rtc_time_edited-display_time_minutes-(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;ui8_minutes-rtc_time-rtc_get_time-(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;ui8_hours-rtc_time-rtc_get_time-(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;ui8_item_visible_start_index-p_lcd_configurations_vars--(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;ui8_item_number-p_lcd_configurations_vars--(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;ui8_item_visible_start_index--(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;ui8_item_number--(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;ui8_item_visible_index--(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;ui32_data-eeprom_read-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;*p_array_data-p_array_data-eeprom_write_array-(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;*p-p-UG_PutChar-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;mode-UTFT_LCD_Write_Bus-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;VL-UTFT_LCD_Write_Bus-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;VH-UTFT_LCD_Write_Bus-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;ui8_reg-UTFT_read_reg_0-(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;ui32_reg_0_value-UTFT_read_reg_0-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;VL-UTFT_LCD_Write_COM-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;ui32_last_color-lcd_pixel_set-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;*ui8_p_var_previous-ui8_p_var_previous-item_var_set_number-(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;*ui8_p_var-ui8_p_var-item_var_set_number-(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;ui32_color-lcd_pixel_set-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;ui8_data-eeprom_init-(format)&quot; val=&quot;4&quot;/&gt;&lt;/contentList&gt;"/>
<stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;globalVariableList&gt;&#10; &lt;globalVariable name=&quot;m_eeprom_data_defaults&quot; path=&quot;&quot;/&gt;&#10;&lt;/globalVariableList&gt;&#10;"/>
<stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;globalVariableList&gt;&#10; &lt;globalVariable name=&quot;m_eeprom_data_defaults&quot; path=&quot;&quot;/&gt;&#10; &lt;globalVariable name=&quot;g_tsdz2_firmware_version&quot; path=&quot;&quot;/&gt;&#10;&lt;/globalVariableList&gt;&#10;"/>
<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;memoryBlockExpressionList&gt;&#10; &lt;memoryBlockExpressionItem&gt;&#10; &lt;expression text=&quot;0x40000000&quot;/&gt;&#10; &lt;/memoryBlockExpressionItem&gt;&#10; &lt;memoryBlockExpressionItem&gt;&#10; &lt;expression text=&quot;0x40000424&quot;/&gt;&#10; &lt;/memoryBlockExpressionItem&gt;&#10; &lt;memoryBlockExpressionItem&gt;&#10; &lt;expression text=&quot;0x807f7fc&quot;/&gt;&#10; &lt;/memoryBlockExpressionItem&gt;&#10;&lt;/memoryBlockExpressionList&gt;&#10;"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="src/main.elf"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="860C_850C"/>
Expand Down
2 changes: 1 addition & 1 deletion firmware/860C_850C/src/2-Debug.launch
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
<booleanAttribute key="org.eclipse.cdt.launch.ENABLE_REGISTER_BOOKKEEPING" value="false"/>
<booleanAttribute key="org.eclipse.cdt.launch.ENABLE_VARIABLE_BOOKKEEPING" value="false"/>
<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;contentList&gt;&lt;content id=&quot;buf[31]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[30]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[29]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[28]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[27]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[26]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[25]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[24]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[23]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[22]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[21]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[20]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[19]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[18]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[17]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[16]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[15]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[14]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[13]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[12]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[11]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[10]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[9]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[8]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[7]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[6]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[5]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[4]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[3]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[2]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[1]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[0]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;ui32_color-lcd_pixel_set-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;*p-p-UG_PutChar-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;mode-UTFT_LCD_Write_Bus-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;VL-UTFT_LCD_Write_Bus-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;VH-UTFT_LCD_Write_Bus-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;ui8_reg-UTFT_read_reg_0-(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;ui32_reg_0_value-UTFT_read_reg_0-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;VL-UTFT_LCD_Write_COM-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;ui32_last_color-lcd_pixel_set-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;ui32_color-UG_PutChar-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;ui8_data-eeprom_init-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;ui8_usart1_tx_buffer-rt_send_tx_package-(cast_to_array)&quot; val=&quot;0:100&quot;/&gt;&lt;/contentList&gt;"/>
<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;contentList&gt;&lt;content id=&quot;ui8_usart1_tx_buffer-rt_send_tx_package-(cast_to_array)&quot; val=&quot;0:100&quot;/&gt;&lt;content id=&quot;ui8_data-eeprom_init-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;ui32_color-UG_PutChar-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;ui32_last_color-lcd_pixel_set-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;VL-UTFT_LCD_Write_COM-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;ui32_reg_0_value-UTFT_read_reg_0-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;ui8_reg-UTFT_read_reg_0-(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;VH-UTFT_LCD_Write_Bus-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;VL-UTFT_LCD_Write_Bus-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;mode-UTFT_LCD_Write_Bus-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;*p-p-UG_PutChar-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;ui32_color-lcd_pixel_set-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;buf[0]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[1]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[2]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[3]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[4]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[5]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[6]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[7]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[8]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[9]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[10]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[11]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[12]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[13]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[14]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[15]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[16]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[17]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[18]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[19]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[20]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[21]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[22]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[23]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[24]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[25]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[26]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[27]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[28]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[29]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[30]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;content id=&quot;buf[31]-buf-fieldPrintf-(format)&quot; val=&quot;0&quot;/&gt;&lt;/contentList&gt;"/>
<stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;globalVariableList&gt;&#10; &lt;globalVariable name=&quot;wheelSpeedField&quot; path=&quot;&quot;/&gt;&#10; &lt;globalVariable name=&quot;wheelSpeedFieldGraph&quot; path=&quot;&quot;/&gt;&#10; &lt;globalVariable name=&quot;curScreen&quot; path=&quot;&quot;/&gt;&#10; &lt;globalVariable name=&quot;m_eeprom_data&quot; path=&quot;&quot;/&gt;&#10;&lt;/globalVariableList&gt;&#10;"/>
<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;memoryBlockExpressionList&gt;&#10; &lt;memoryBlockExpressionItem&gt;&#10; &lt;expression text=&quot;0x40000000&quot;/&gt;&#10; &lt;/memoryBlockExpressionItem&gt;&#10; &lt;memoryBlockExpressionItem&gt;&#10; &lt;expression text=&quot;0x40000424&quot;/&gt;&#10; &lt;/memoryBlockExpressionItem&gt;&#10; &lt;memoryBlockExpressionItem&gt;&#10; &lt;expression text=&quot;0x2000ff5c&quot;/&gt;&#10; &lt;/memoryBlockExpressionItem&gt;&#10; &lt;memoryBlockExpressionItem&gt;&#10; &lt;expression text=&quot;0x2000ff3c&quot;/&gt;&#10; &lt;/memoryBlockExpressionItem&gt;&#10;&lt;/memoryBlockExpressionList&gt;&#10;"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="src/main.elf"/>
Expand Down
11 changes: 6 additions & 5 deletions firmware/860C_850C/src/mainscreen-850.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ void mainScreenOnDirtyClean() {
if (ui_vars.ui8_street_mode_function_enabled == 0)
assist_color = MAIN_SCREEN_FIELD_LABELS_COLOR;

// if motorMaxPowerField is enable, do not show ASSIST
if (motorMaxPowerField.rw->visibility == FieldTransitionVisible) {
// if fieldAlternate is enable, do not show ASSIST
if ((fieldAlternate.rw->visibility == FieldTransitionVisible) ||
(fieldAlternate.rw->visibility == FieldVisible)) {
UG_PutString(14, 46, " ");
} else {
UG_SetForecolor(assist_color);
Expand Down Expand Up @@ -152,7 +153,7 @@ Screen mainScreen1 = {
{
.x = 2, .y = 76,
.width = 100, .height = 70 ,
.field = &motorMaxPowerField,
.field = &fieldAlternate,
.font = &MEDIUM_NUMBERS_TEXT_FONT,
.label_align_y = AlignTop,
.align_x = AlignCenter,
Expand Down Expand Up @@ -269,7 +270,7 @@ Screen mainScreen2 = {
{
.x = 2, .y = 76,
.width = 100, .height = 70 ,
.field = &motorMaxPowerField,
.field = &fieldAlternate,
.font = &MEDIUM_NUMBERS_TEXT_FONT,
.label_align_y = AlignTop,
.align_x = AlignCenter,
Expand Down Expand Up @@ -386,7 +387,7 @@ Screen mainScreen3 = {
{
.x = 2, .y = 76,
.width = 100, .height = 70 ,
.field = &motorMaxPowerField,
.field = &fieldAlternate,
.font = &MEDIUM_NUMBERS_TEXT_FONT,
.label_align_y = AlignTop,
.align_x = AlignCenter,
Expand Down
2 changes: 1 addition & 1 deletion firmware/SW102/src/sw102/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ int main(void)
// if(tick < 50 * 5) // uncomment to force a watchdog failure after 5 seconds
// watchdog_service(); // we only service the watchdog if we see our ticks are still increasing

if(tick != lasttick + 1) {
if (tick != lasttick + 1) {
ticksmissed += (tick - lasttick - 1); // Error! We fell behind and missed some ticks (probably due to screen draw taking more than 20 msec)

// if(is_sim_motor) app_error_fault_handler(FAULT_MISSEDTICK, 0, ticksmissed);
Expand Down
38 changes: 19 additions & 19 deletions firmware/SW102/src/sw102/mainscreen-sw102.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ static void mainScreenOnEnter() {
#define MAIN_SCREEN_WHEELSPEED_WIDTH 62
#define MAIN_SCREEN_WHEELSPEED_HEIGHT 40

#define MAIN_SCREEN_MAXPOWER_X 1
#define MAIN_SCREEN_MAXPOWER_Y 21
#define MAIN_SCREEN_MAXPOWER_WIDTH 62
#define MAIN_SCREEN_MAXPOWER_HEIGHT 34
#define MAIN_SCREEN_WHEELSPEED_ALTERNATE_X 1
#define MAIN_SCREEN_WHEELSPEED_ALTERNATE_Y 21
#define MAIN_SCREEN_WHEELSPEED_ALTERNATE_WIDTH 62
#define MAIN_SCREEN_WHEELSPEED_ALTERNATE_HEIGHT 34

#define MAIN_SCREEN_CUSTOM_1_X 1
#define MAIN_SCREEN_CUSTOM_1_Y 63
Expand Down Expand Up @@ -105,11 +105,11 @@ Screen mainScreen1 = {
.border = BorderNone,
},
{
.x = MAIN_SCREEN_MAXPOWER_X,
.y = MAIN_SCREEN_MAXPOWER_Y,
.width = MAIN_SCREEN_MAXPOWER_WIDTH,
.height = MAIN_SCREEN_MAXPOWER_HEIGHT,
.field = &motorMaxPowerField,
.x = MAIN_SCREEN_WHEELSPEED_ALTERNATE_X,
.y = MAIN_SCREEN_WHEELSPEED_ALTERNATE_Y,
.width = MAIN_SCREEN_WHEELSPEED_ALTERNATE_WIDTH,
.height = MAIN_SCREEN_WHEELSPEED_ALTERNATE_HEIGHT,
.field = &fieldAlternate,
.font = &MEDIUM_NUMBERS_TEXT_FONT,
.label_align_y = AlignTop,
.align_x = AlignCenter,
Expand Down Expand Up @@ -171,11 +171,11 @@ Screen mainScreen2 = {
.border = BorderNone,
},
{
.x = MAIN_SCREEN_MAXPOWER_X,
.y = MAIN_SCREEN_MAXPOWER_Y,
.width = MAIN_SCREEN_MAXPOWER_WIDTH,
.height = MAIN_SCREEN_MAXPOWER_HEIGHT,
.field = &motorMaxPowerField,
.x = MAIN_SCREEN_WHEELSPEED_ALTERNATE_X,
.y = MAIN_SCREEN_WHEELSPEED_ALTERNATE_Y,
.width = MAIN_SCREEN_WHEELSPEED_ALTERNATE_WIDTH,
.height = MAIN_SCREEN_WHEELSPEED_ALTERNATE_HEIGHT,
.field = &fieldAlternate,
.font = &MEDIUM_NUMBERS_TEXT_FONT,
.label_align_y = AlignTop,
.align_x = AlignCenter,
Expand Down Expand Up @@ -237,11 +237,11 @@ Screen mainScreen3 = {
.border = BorderNone,
},
{
.x = MAIN_SCREEN_MAXPOWER_X,
.y = MAIN_SCREEN_MAXPOWER_Y,
.width = MAIN_SCREEN_MAXPOWER_WIDTH,
.height = MAIN_SCREEN_MAXPOWER_HEIGHT,
.field = &motorMaxPowerField,
.x = MAIN_SCREEN_WHEELSPEED_ALTERNATE_X,
.y = MAIN_SCREEN_WHEELSPEED_ALTERNATE_Y,
.width = MAIN_SCREEN_WHEELSPEED_ALTERNATE_WIDTH,
.height = MAIN_SCREEN_WHEELSPEED_ALTERNATE_HEIGHT,
.field = &fieldAlternate,
.font = &MEDIUM_NUMBERS_TEXT_FONT,
.label_align_y = AlignTop,
.align_x = AlignCenter,
Expand Down

0 comments on commit 4da9167

Please sign in to comment.