Mercurial > public > ostc4
comparison Discovery/Src/data_central.c @ 868:db92692c014f Evo_2_23
Introduce speed dependend coloring of depth:
The depth value in the will now be colored based on the current ascent speed. The color code matches the one of the bar graph which was already used for visualization of the ascent speed. To keep color code consistent the existing color selection functions have been merged to one common Gfx function (T3/T7 - bar graph and color text)
author | Ideenmodellierer |
---|---|
date | Mon, 12 Aug 2024 15:14:19 +0200 |
parents | 70092f552f5a |
children | e373e90a48db |
comparison
equal
deleted
inserted
replaced
867:3311b720a072 | 868:db92692c014f |
---|---|
909 | 909 |
910 void disableTimer(void) | 910 void disableTimer(void) |
911 { | 911 { |
912 stateUsedWrite->timerState = TIMER_STATE_OFF; | 912 stateUsedWrite->timerState = TIMER_STATE_OFF; |
913 } | 913 } |
914 | |
915 #define SPEED_SLOW (5.0f) | |
916 #define SPEED_MEDIUM (10.0f) | |
917 #define SPEED_HIGH (15.0f) | |
918 | |
919 uint8_t drawingColor_from_ascentspeed(float speed) | |
920 { | |
921 uint8_t color = CLUT_Font020; | |
922 | |
923 if(speed >= SPEED_HIGH) | |
924 { | |
925 color = CLUT_WarningRed; | |
926 } | |
927 else if(speed >= SPEED_MEDIUM) | |
928 { | |
929 color = CLUT_WarningYellow; | |
930 } | |
931 else if(speed >= SPEED_SLOW) | |
932 { | |
933 color = CLUT_NiceGreen; | |
934 } | |
935 return color; | |
936 } | |
937 | |
938 |