284 {
286
287
288
289
290 fl::u8 t192 = scale8_video(temperature, 191);
291
292
293
294 fl::u8 heatramp = t192 & 0x3F;
295 heatramp <<= 2;
296
297
298 if (t192 & 0x80) {
299
300 heatcolor.r = 255;
301 heatcolor.g = 255;
302 heatcolor.b = heatramp;
303
304 } else if (t192 & 0x40) {
305
306 heatcolor.r = 255;
307 heatcolor.g = heatramp;
308 heatcolor.b = 0;
309
310 } else {
311
312 heatcolor.r = heatramp;
313 heatcolor.g = 0;
314 heatcolor.b = 0;
315 }
316
317 return heatcolor;
318}