fixed colour maps and some matrix misalignments# Please enter the commit message for your changes. Lines starting
This commit is contained in:
+14
-8
@@ -17,7 +17,8 @@
|
||||
// Include files
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#include "string.h"
|
||||
#include <string>
|
||||
#include<cstring>
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
@@ -262,17 +263,19 @@ extern "C" void app_main(void)
|
||||
|
||||
Clock clock(Clock::mode::TEN_BEFORE_HALF);
|
||||
|
||||
clockWordmap.setColour(0xFF, 0x00, 0xFF);
|
||||
dayWordmap.setColour(0x20, 0xFF, 0x80);
|
||||
tempWordmap.setColour(0x40, 0x40, 0xFF);
|
||||
clockWordmap.setColour(0x00, 0xFF, 0xFF);
|
||||
dayWordmap.setColour(0x20, 0xCC, 0x80);
|
||||
|
||||
countdown(1000);
|
||||
|
||||
// countdown(1000);
|
||||
|
||||
list<string> clockWordlist;
|
||||
list<string> tempWordList;
|
||||
|
||||
|
||||
while (true)
|
||||
{
|
||||
|
||||
clock.generateWordlist(&clockWordlist);
|
||||
|
||||
|
||||
@@ -285,15 +288,18 @@ extern "C" void app_main(void)
|
||||
}
|
||||
|
||||
// Get the temperature from sensor
|
||||
int currentTemperature = bmp280.getTemperature();
|
||||
currentTemperature = 19;
|
||||
// LOGGER_INFO("The current temperature is: %i", temperature);
|
||||
int currentTemperature = bmp280.getTemperature() / 100;
|
||||
|
||||
LOGGER_INFO("The current temperature is: %i (%s)", currentTemperature, to_string(21));
|
||||
// Generate temperature wordlist
|
||||
temperature.generateWordlist(currentTemperature, &tempWordList);
|
||||
for(it = tempWordList.begin(); it != tempWordList.end(); it++)
|
||||
{
|
||||
tempWordmap.setWord(Wordmap::Language_t::NL, *it, true);
|
||||
}
|
||||
uint8_t tRed, tGreen, tBlue;
|
||||
temperature.calculateRGB(currentTemperature, &tRed, &tGreen, &tBlue);
|
||||
tempWordmap.setColour(tRed, tGreen, tBlue);
|
||||
|
||||
// Add a seconds indicator
|
||||
matrix.setPixelValue(11, 11, clock.getTime() % 2);
|
||||
|
||||
Reference in New Issue
Block a user