Mercurial > public > ostc4
diff 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 |
line wrap: on
line diff
--- a/Discovery/Src/t7.c Fri Apr 22 18:24:43 2022 +0200 +++ b/Discovery/Src/t7.c Mon Apr 25 21:07:28 2022 +0200 @@ -2472,7 +2472,7 @@ TextR1[textPointer++] = '\a'; TextR1[textPointer++] = '\001'; TextR1[textPointer++] = ' '; - textPointer += snprintf(&TextR1[textPointer],TEXTSIZE,"%f01.2",((float)(stateUsed->diveSettings.setpoint[actualBetterSetpointId()].setpoint_cbar))/100); + textPointer += snprintf(&TextR1[textPointer],TEXTSIZE,"%01.2f",(float)(stateUsed->diveSettings.setpoint[actualBetterSetpointId()].setpoint_cbar) / 100.0); TextR1[textPointer++] = '?'; TextR1[textPointer++] = ' '; TextR1[textPointer++] = 0;