Skip to content
Snippets Groups Projects

Hospital startup animation

Merged Jan Schmitz requested to merge hospital_startup_animation into master
4 files
+ 20
10
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 7
2
@@ -412,7 +412,7 @@ void init_entity(hospital_control* control)
atof(CONFIG_PWR_MON_R_SHUNT), atof(CONFIG_PWR_MON_I_MAX)));
// init virtual ups
entity.ups.charge_level = 50.0;
entity.ups.charge_level = 0.0;
entity.ups.charge_rate = 5.0;
entity.ups.discharge_rate = 10.0;
@@ -420,7 +420,12 @@ void init_entity(hospital_control* control)
control->pca = pca9956_init(CONFIG_PWR_MON_I2C_BUS, 0x19, 2000, 19);
control->ups_led = init_ups_leds(&control->pca);
control->car_led = init_car_leds(&control->pca);
ups_leds_startup_animation(&control->ups_led);
// startup animation, pwm switch because roof/helicopter leds are not
// handled by the led driver in the current version of the pcb
hospital_leds_startup_animation(&control->ups_led, &control->car_led);
pwm_switch(LED_ROOM_1, entity.led_intensity * LED_INTENSITY_100);
vTaskDelay(500 / portTICK_PERIOD_MS);
pwm_switch(LED_ROOM_1, LED_INTENSITY_0);
ESP_LOGD(TAG, "Charge Level %f", entity.ups.charge_level);
Loading