@@ -94,10 +94,10 @@ const char* ffOptionsParseDisplayJsonConfig(FFOptionsDisplay* options, yyjson_va
9494 yyjson_val * ndigits = yyjson_obj_get (val , "ndigits" );
9595 if (ndigits ) options -> percentNdigits = (uint8_t ) yyjson_get_uint (ndigits );
9696 }
97- else if (ffStrEqualsIgnCase (key , "temperature " ))
97+ else if (ffStrEqualsIgnCase (key , "temp " ))
9898 {
9999 if (!yyjson_is_obj (val ))
100- return "display.temperature must be an object" ;
100+ return "display.temp must be an object" ;
101101
102102 yyjson_val * unit = yyjson_obj_get (val , "unit" );
103103 if (unit )
@@ -117,7 +117,7 @@ const char* ffOptionsParseDisplayJsonConfig(FFOptionsDisplay* options, yyjson_va
117117 }
118118
119119 yyjson_val * ndigits = yyjson_obj_get (val , "ndigits" );
120- if (ndigits ) options -> temperatureNdigits = (uint8_t ) yyjson_get_uint (ndigits );
120+ if (ndigits ) options -> tempNdigits = (uint8_t ) yyjson_get_uint (ndigits );
121121
122122 yyjson_val * color = yyjson_obj_get (val , "color" );
123123 if (color )
@@ -126,13 +126,13 @@ const char* ffOptionsParseDisplayJsonConfig(FFOptionsDisplay* options, yyjson_va
126126 return "display.temperature.color must be an object" ;
127127
128128 yyjson_val * green = yyjson_obj_get (color , "green" );
129- if (green ) ffOptionParseColor (yyjson_get_str (green ), & options -> temperatureColorGreen );
129+ if (green ) ffOptionParseColor (yyjson_get_str (green ), & options -> tempColorGreen );
130130
131131 yyjson_val * yellow = yyjson_obj_get (color , "yellow" );
132- if (yellow ) ffOptionParseColor (yyjson_get_str (yellow ), & options -> temperatureColorYellow );
132+ if (yellow ) ffOptionParseColor (yyjson_get_str (yellow ), & options -> tempColorYellow );
133133
134134 yyjson_val * red = yyjson_obj_get (color , "red" );
135- if (red ) ffOptionParseColor (yyjson_get_str (red ), & options -> temperatureColorRed );
135+ if (red ) ffOptionParseColor (yyjson_get_str (red ), & options -> tempColorRed );
136136 }
137137 }
138138 else if (ffStrEqualsIgnCase (key , "percent" ))
@@ -295,13 +295,13 @@ bool ffOptionsParseDisplayCommandLine(FFOptionsDisplay* options, const char* key
295295 });
296296 }
297297 else if (ffStrEqualsIgnCase (subkey , "ndigits" ))
298- options -> temperatureNdigits = (uint8_t ) ffOptionParseUInt32 (key , value );
298+ options -> tempNdigits = (uint8_t ) ffOptionParseUInt32 (key , value );
299299 else if (ffStrEqualsIgnCase (subkey , "color-green" ))
300- ffOptionParseColor (value , & options -> temperatureColorGreen );
300+ ffOptionParseColor (value , & options -> tempColorGreen );
301301 else if (ffStrEqualsIgnCase (subkey , "color-yellow" ))
302- ffOptionParseColor (value , & options -> temperatureColorYellow );
302+ ffOptionParseColor (value , & options -> tempColorYellow );
303303 else if (ffStrEqualsIgnCase (subkey , "color-red" ))
304- ffOptionParseColor (value , & options -> temperatureColorRed );
304+ ffOptionParseColor (value , & options -> tempColorRed );
305305 else
306306 return false;
307307 }
@@ -368,10 +368,10 @@ void ffOptionsInitDisplay(FFOptionsDisplay* options)
368368 options -> keyWidth = 0 ;
369369
370370 options -> temperatureUnit = FF_TEMPERATURE_UNIT_CELSIUS ;
371- options -> temperatureNdigits = 1 ;
372- ffStrbufInitStatic (& options -> temperatureColorGreen , FF_COLOR_FG_GREEN );
373- ffStrbufInitStatic (& options -> temperatureColorYellow , FF_COLOR_FG_LIGHT_YELLOW );
374- ffStrbufInitStatic (& options -> temperatureColorRed , FF_COLOR_FG_LIGHT_RED );
371+ options -> tempNdigits = 1 ;
372+ ffStrbufInitStatic (& options -> tempColorGreen , FF_COLOR_FG_GREEN );
373+ ffStrbufInitStatic (& options -> tempColorYellow , FF_COLOR_FG_LIGHT_YELLOW );
374+ ffStrbufInitStatic (& options -> tempColorRed , FF_COLOR_FG_LIGHT_RED );
375375
376376 ffStrbufInitStatic (& options -> barCharElapsed , "■" );
377377 ffStrbufInitStatic (& options -> barCharTotal , "-" );
@@ -492,21 +492,21 @@ void ffOptionsGenerateDisplayJsonConfig(FFOptionsDisplay* options, yyjson_mut_do
492492 break ;
493493 }
494494 }
495- if (options -> temperatureNdigits != defaultOptions .temperatureNdigits )
496- yyjson_mut_obj_add_uint (doc , temperature , "ndigits" , options -> temperatureNdigits );
495+ if (options -> tempNdigits != defaultOptions .tempNdigits )
496+ yyjson_mut_obj_add_uint (doc , temperature , "ndigits" , options -> tempNdigits );
497497 {
498498 yyjson_mut_val * color = yyjson_mut_obj (doc );
499- if (!ffStrbufEqual (& options -> temperatureColorGreen , & defaultOptions .temperatureColorGreen ))
500- yyjson_mut_obj_add_strbuf (doc , color , "green" , & options -> temperatureColorGreen );
501- if (!ffStrbufEqual (& options -> temperatureColorYellow , & defaultOptions .temperatureColorYellow ))
502- yyjson_mut_obj_add_strbuf (doc , color , "yellow" , & options -> temperatureColorYellow );
503- if (!ffStrbufEqual (& options -> temperatureColorRed , & defaultOptions .temperatureColorRed ))
504- yyjson_mut_obj_add_strbuf (doc , color , "red" , & options -> temperatureColorRed );
499+ if (!ffStrbufEqual (& options -> tempColorGreen , & defaultOptions .tempColorGreen ))
500+ yyjson_mut_obj_add_strbuf (doc , color , "green" , & options -> tempColorGreen );
501+ if (!ffStrbufEqual (& options -> tempColorYellow , & defaultOptions .tempColorYellow ))
502+ yyjson_mut_obj_add_strbuf (doc , color , "yellow" , & options -> tempColorYellow );
503+ if (!ffStrbufEqual (& options -> tempColorRed , & defaultOptions .tempColorRed ))
504+ yyjson_mut_obj_add_strbuf (doc , color , "red" , & options -> tempColorRed );
505505 if (yyjson_mut_obj_size (color ) > 0 )
506506 yyjson_mut_obj_add_val (doc , temperature , "color" , color );
507507 }
508508 if (yyjson_mut_obj_size (temperature ) > 0 )
509- yyjson_mut_obj_add_val (doc , obj , "temperature " , temperature );
509+ yyjson_mut_obj_add_val (doc , obj , "temp " , temperature );
510510 }
511511
512512 {
0 commit comments