Application develop start
This commit is contained in:
@@ -14,7 +14,7 @@ namespace drivers
|
||||
ledcAttach(c_buzzerPin, 1000, 8);
|
||||
m_bp.pin = c_buzzerPin;
|
||||
m_bp.beeperTask = NULL;
|
||||
beep(50, NOTE_G);
|
||||
beep(50, NOTE_C);
|
||||
}
|
||||
|
||||
Buzzer::~Buzzer()
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace drivers
|
||||
void Led::setColor(const color_t color)
|
||||
{
|
||||
blinkStop();
|
||||
rgbLedWrite(c_ledPin, color.r, color.g, color.b);
|
||||
rgbLedWrite(c_ledPin, color.g, color.r, color.b);
|
||||
}
|
||||
|
||||
void Led::blinkColor(const uint16_t tOn, const uint16_t tOff, const color_t color)
|
||||
|
||||
@@ -20,6 +20,17 @@ namespace drivers
|
||||
uint8_t b;
|
||||
} color_t;
|
||||
|
||||
const color_t COLOR_RED = {255, 0, 0};
|
||||
const color_t COLOR_ORANGE = {255, 127, 0};
|
||||
const color_t COLOR_YELLOW = {255, 255, 0};
|
||||
const color_t COLOR_CHARTREUSE = {127, 255, 0};
|
||||
const color_t COLOR_GREEN = {0, 255, 0};
|
||||
const color_t COLOR_CYAN = {0, 255, 255};
|
||||
const color_t COLOR_SKYBLUE = {0, 127, 255};
|
||||
const color_t COLOR_BLUE = {0, 0, 255};
|
||||
const color_t COLOR_VIOLET = {127, 0, 255};
|
||||
const color_t COLOR_MAGENTA = {255, 0, 255};
|
||||
|
||||
private:
|
||||
typedef struct
|
||||
{
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace drivers
|
||||
auto now = millis();
|
||||
if ((now - m_lastAccess) < c_minDelay) // fixed milliseconds delay between commands to different devices
|
||||
{
|
||||
LOG_WARN("MODBUS access delay", (now - m_lastAccess), "device", device);
|
||||
LOG_DEBUG("MODBUS access delay", (now - m_lastAccess), "device", device);
|
||||
delay(now - m_lastAccess);
|
||||
}
|
||||
m_lastDevice = device;
|
||||
|
||||
Reference in New Issue
Block a user