Hardware button brightness can now be set in the app.
This commit is contained in:
@@ -21,6 +21,8 @@ void configSave() {
|
||||
i+=sizeof(mSpeed.dn);
|
||||
EEPROM.put(i,mSpeed.accel);
|
||||
i+=sizeof(mSpeed.accel);
|
||||
EEPROM.put(i,ledButtonBrightness);
|
||||
i+=sizeof(ledButtonBrightness);
|
||||
EEPROM.commit();
|
||||
Serial.println("Config Saved");
|
||||
}
|
||||
@@ -43,6 +45,8 @@ void configLoad() {
|
||||
i+=sizeof(mSpeed.dn);
|
||||
EEPROM.get(i,mSpeed.accel);
|
||||
i+=sizeof(mSpeed.accel);
|
||||
EEPROM.get(i,ledButtonBrightness);
|
||||
i+=sizeof(ledButtonBrightness);
|
||||
Serial.println("Config Loaded");
|
||||
Serial.println(savedPosition);
|
||||
}
|
||||
|
||||
@@ -7,10 +7,10 @@ bool configSaveFlag = false;
|
||||
|
||||
void sendBlynk() { //Blynk Feedback
|
||||
Blynk.virtualWrite(V1,stepper.currentPosition());
|
||||
Blynk.virtualWrite(V28,pwm.on);
|
||||
|
||||
if (pwm.old != pwm.set) {
|
||||
Blynk.virtualWrite(V27,pwm.set);
|
||||
Blynk.virtualWrite(V28,pwm.on);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ void sendBlynk() { //Blynk Feedback
|
||||
Blynk.virtualWrite(V31,mSpeed.accel);
|
||||
Blynk.virtualWrite(V34,mSpeed.dn);
|
||||
Blynk.virtualWrite(V32,mInvert.is);
|
||||
Blynk.virtualWrite(V37,ledButtonBrightness);
|
||||
firstRun = false;
|
||||
}
|
||||
}
|
||||
@@ -103,3 +104,7 @@ BLYNK_WRITE(V35) {
|
||||
BLYNK_WRITE(V36) {
|
||||
configLoadFlag = param.asInt();
|
||||
}
|
||||
|
||||
BLYNK_WRITE(V37) {
|
||||
ledButtonBrightness = param.asInt();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user