comparison Discovery/Src/t7.c @ 680:5575f21382d5 Betatest

Bugfix visualization better setpoint: Due to a formating mistake a complete float was show in case a better setpoint had been suggested. The string formating has been updated to show a 4 characters string
author Ideenmodellierer
date Mon, 25 Apr 2022 21:07:28 +0200
parents 3c4a3d78ff2b
children 79ce499e26aa
comparison
equal deleted inserted replaced
679:52df13712fa3 680:5575f21382d5
2470 { 2470 {
2471 textPointer = 0; 2471 textPointer = 0;
2472 TextR1[textPointer++] = '\a'; 2472 TextR1[textPointer++] = '\a';
2473 TextR1[textPointer++] = '\001'; 2473 TextR1[textPointer++] = '\001';
2474 TextR1[textPointer++] = ' '; 2474 TextR1[textPointer++] = ' ';
2475 textPointer += snprintf(&TextR1[textPointer],TEXTSIZE,"%f01.2",((float)(stateUsed->diveSettings.setpoint[actualBetterSetpointId()].setpoint_cbar))/100); 2475 textPointer += snprintf(&TextR1[textPointer],TEXTSIZE,"%01.2f",(float)(stateUsed->diveSettings.setpoint[actualBetterSetpointId()].setpoint_cbar) / 100.0);
2476 TextR1[textPointer++] = '?'; 2476 TextR1[textPointer++] = '?';
2477 TextR1[textPointer++] = ' '; 2477 TextR1[textPointer++] = ' ';
2478 TextR1[textPointer++] = 0; 2478 TextR1[textPointer++] = 0;
2479 GFX_write_string_color(&FontT48,&t7c2,TextR1,0,CLUT_WarningYellow); 2479 GFX_write_string_color(&FontT48,&t7c2,TextR1,0,CLUT_WarningYellow);
2480 } 2480 }