Mercurial > public > ostc4
comparison Discovery/Src/t7.c @ 979:e7cd7ffd1879 Evo_2_23
Add proper string termination and fix space. (mikeller)
| author | heinrichsweikamp |
|---|---|
| date | Tue, 04 Feb 2025 13:48:53 +0100 |
| parents | 3d8c22c1f9e2 |
| children | 7149f372b0ba |
comparison
equal
deleted
inserted
replaced
| 978:57b82ae99969 | 979:e7cd7ffd1879 |
|---|---|
| 2979 GFX_write_string_color(&FontT48,&t7c2,TextR1,0,CLUT_WarningYellow); | 2979 GFX_write_string_color(&FontT48,&t7c2,TextR1,0,CLUT_WarningYellow); |
| 2980 } else if (get_globalState() == StDBAILOUT) { | 2980 } else if (get_globalState() == StDBAILOUT) { |
| 2981 if (isLoopMode(stateUsed->diveSettings.diveMode)) { | 2981 if (isLoopMode(stateUsed->diveSettings.diveMode)) { |
| 2982 textPointer = snprintf(TextR1, TEXTSIZE, "\a\001 %c%c ", TXT_2BYTE, TXT2BYTE_BailoutShort); | 2982 textPointer = snprintf(TextR1, TEXTSIZE, "\a\001 %c%c ", TXT_2BYTE, TXT2BYTE_BailoutShort); |
| 2983 textPointer += tHome_gas_writer(stateUsed->diveSettings.gas[actualBetterBailoutGasId()].oxygen_percentage, stateUsed->diveSettings.gas[actualBetterBailoutGasId()].helium_percentage, &TextR1[textPointer]); | 2983 textPointer += tHome_gas_writer(stateUsed->diveSettings.gas[actualBetterBailoutGasId()].oxygen_percentage, stateUsed->diveSettings.gas[actualBetterBailoutGasId()].helium_percentage, &TextR1[textPointer]); |
| 2984 TextR1[textPointer++] = '?'; | |
| 2984 TextR1[textPointer++] = ' '; | 2985 TextR1[textPointer++] = ' '; |
| 2985 TextR1[textPointer++] = '?'; | 2986 TextR1[textPointer++] = 0; |
| 2986 } else { | 2987 } else { |
| 2987 textPointer = snprintf(TextR1, TEXTSIZE, "\a\001 %c%c %01.2f/", TXT_2BYTE, TXT2BYTE_LoopShort, stateUsed->diveSettings.setpoint[actualBetterSetpointId()].setpoint_cbar / 100.0); | 2988 textPointer = snprintf(TextR1, TEXTSIZE, "\a\001 %c%c %01.2f/", TXT_2BYTE, TXT2BYTE_LoopShort, stateUsed->diveSettings.setpoint[actualBetterSetpointId()].setpoint_cbar / 100.0); |
| 2988 textPointer += tHome_gas_writer(stateUsed->diveSettings.gas[stateUsed->lifeData.lastDiluent_GasIdInSettings].oxygen_percentage, stateUsed->diveSettings.gas[stateUsed->lifeData.lastDiluent_GasIdInSettings].helium_percentage, &TextR1[textPointer]); | 2989 textPointer += tHome_gas_writer(stateUsed->diveSettings.gas[stateUsed->lifeData.lastDiluent_GasIdInSettings].oxygen_percentage, stateUsed->diveSettings.gas[stateUsed->lifeData.lastDiluent_GasIdInSettings].helium_percentage, &TextR1[textPointer]); |
| 2990 TextR1[textPointer++] = '?'; | |
| 2989 TextR1[textPointer++] = ' '; | 2991 TextR1[textPointer++] = ' '; |
| 2990 TextR1[textPointer++] = '?'; | 2992 TextR1[textPointer++] = 0; |
| 2991 } | 2993 } |
| 2992 | 2994 |
| 2993 GFX_write_string_color(&FontT48, &t7c2, TextR1, 0, CLUT_WarningYellow); | 2995 GFX_write_string_color(&FontT48, &t7c2, TextR1, 0, CLUT_WarningYellow); |
| 2994 } else if (get_globalState() == StDSETPOINT) { | 2996 } else if (get_globalState() == StDSETPOINT) { |
| 2995 snprintf(TextR1, TEXTSIZE, "\a\001 %c%c %01.2f? ", TXT_2BYTE, TXT2BYTE_SetpointShort, getSwitchToSetpointCbar() / 100.0); | 2997 snprintf(TextR1, TEXTSIZE, "\a\001 %c%c %01.2f? ", TXT_2BYTE, TXT2BYTE_SetpointShort, getSwitchToSetpointCbar() / 100.0); |
| 4919 { | 4921 { |
| 4920 color = 0xff; | 4922 color = 0xff; |
| 4921 } | 4923 } |
| 4922 return color; | 4924 return color; |
| 4923 } | 4925 } |
| 4926 | |
| 4924 void t7_tick(void) | 4927 void t7_tick(void) |
| 4925 { | 4928 { |
| 4926 SSettings *settings = settingsGetPointer(); | 4929 SSettings *settings = settingsGetPointer(); |
| 4927 | 4930 |
| 4928 int nowS = current_second(); | 4931 int nowS = current_second(); |
