Skip to content
Snippets Groups Projects
Commit 820f92ff authored by Armin Co's avatar Armin Co
Browse files

Update

parent 630fd566
Branches
No related tags found
No related merge requests found
......@@ -73,6 +73,10 @@ void SmartGridModell::set_village_color(uint8_t red, uint8_t green)
{
set_output_pin(Pin::VillageNetRed, red);
set_output_pin(Pin::VillageNetGreen, green);
if (green < 200)
{
green = 0; // green can only be on or off;
}
for (auto house : {House::One, House::Two, House::Three, House::Four, House::Five})
{
......@@ -106,7 +110,7 @@ void SmartGridModell::set_output_pin(Pin pin, uint8_t value)
bool succ = m_modell.send(static_cast<uint8_t>(pin), value);
spdlog::debug("Send: {} {}, success: {}", pin, value, succ);
using namespace std;
this_thread::sleep_for(chrono::milliseconds(10));
this_thread::sleep_for(chrono::milliseconds(12));
}
void SmartGridModell::set_house_color(House number, uint8_t red, uint8_t green)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment