changed structure of treppe.h and renamed treppe.cpp accordingly, added header guards
This commit is contained in:
parent
13af5fd197
commit
b4513dc418
@ -194,7 +194,7 @@ float Treppe::read_ldr()
|
||||
|
||||
bool Treppe::check_ldr()
|
||||
{
|
||||
static uint8_t active = 0;
|
||||
static bool active = 0;
|
||||
|
||||
#ifdef LDRDEBUG
|
||||
Serial.printf("R(LDR) = %f kOhm %f lux\n", ldr_value, lux);
|
||||
@ -203,7 +203,6 @@ bool Treppe::check_ldr()
|
||||
|
||||
// follow up: averaging over many samples?
|
||||
float ldr = read_ldr();
|
||||
bool active = false;
|
||||
|
||||
if (ldr < ldr_schwelle) {
|
||||
idle_pwm_soll = idle_pwm_max;
|
||||
@ -229,36 +228,31 @@ void Treppe::task()
|
||||
m=micros();
|
||||
fsm_inputs.sensor_oben = read_sensor(SENSOR_OBEN);
|
||||
fsm_inputs.sensor_unten = read_sensor(SENSOR_UNTEN);
|
||||
//fsm_inputs.anim_beendet = anim_beendet;
|
||||
Serial.print("2:");
|
||||
Serial.println(micros()-m);
|
||||
fsm_inputs.anim_beendet = anim_beendet;
|
||||
// Serial.print("2:");
|
||||
// Serial.println(micros()-m);
|
||||
|
||||
m=micros();
|
||||
// FSMTreppe_Obj.setExternalInputs(&fsm_inputs);
|
||||
Serial.print("3:");
|
||||
Serial.println(micros()-m);
|
||||
FSMTreppe_Obj.setExternalInputs(&fsm_inputs);
|
||||
// Serial.print("3:");
|
||||
// Serial.println(micros()-m);
|
||||
|
||||
m=micros();
|
||||
FSMTreppe_Obj.step();
|
||||
Serial.print("4:");
|
||||
Serial.println(micros()-m);
|
||||
// Serial.print("4:");
|
||||
// Serial.println(micros()-m);
|
||||
|
||||
m=micros();
|
||||
fsm_outputs = FSMTreppe_Obj.getExternalOutputs();
|
||||
Serial.print("5:");
|
||||
Serial.println(micros()-m);
|
||||
// Serial.print("5:");
|
||||
// Serial.println(micros()-m);
|
||||
|
||||
dimm_treppe();
|
||||
|
||||
m=micros();
|
||||
print_state_on_change();
|
||||
Serial.print("6:");
|
||||
Serial.println(micros()-m);
|
||||
// Serial.print("6:");
|
||||
// Serial.println(micros()-m);
|
||||
|
||||
m=micros();
|
||||
|
||||
dimm_treppe();
|
||||
|
||||
if (fsm_outputs.status == ST_AUFDIMMEN_HOCH ||
|
||||
fsm_outputs.status == ST_ABDIMMEN_HOCH ||
|
||||
fsm_outputs.status == ST_AUFDIMMEN_RUNTER ||
|
||||
@ -278,8 +272,8 @@ void Treppe::task()
|
||||
// anim_beendet = dimm_treppe();
|
||||
// }
|
||||
|
||||
Serial.print("7:");
|
||||
Serial.println(micros()-m);
|
||||
// Serial.print("7:");
|
||||
// Serial.println(micros()-m);
|
||||
}
|
||||
|
||||
void Treppe::berechne_dimmer()
|
||||
|
Loading…
x
Reference in New Issue
Block a user