Compare commits
No commits in common. "8f05f1ac642eaf1d949f2b50a6065f3d18a4453e" and "9b2cb3a7127ce97087b574d07a75a2243105e344" have entirely different histories.
8f05f1ac64
...
9b2cb3a712
1 changed files with 10 additions and 3 deletions
13
main/main.c
13
main/main.c
|
|
@ -87,6 +87,7 @@ void app_main(void) {
|
||||||
ESP_LOGI(TAG, "name: %p", name);
|
ESP_LOGI(TAG, "name: %p", name);
|
||||||
|
|
||||||
uint8_t tank_levels[] = { 100, 100, 100, 100 };
|
uint8_t tank_levels[] = { 100, 100, 100, 100 };
|
||||||
|
uint16_t pump_ramp_ms[] = { 500, 500, 500, 500 };
|
||||||
|
|
||||||
cfglr_handle_t cfglr_handle = {
|
cfglr_handle_t cfglr_handle = {
|
||||||
.namespace = "configulator",
|
.namespace = "configulator",
|
||||||
|
|
@ -104,6 +105,8 @@ void app_main(void) {
|
||||||
CFGLR_SIGNALER_CALLBACK(test_callback)
|
CFGLR_SIGNALER_CALLBACK(test_callback)
|
||||||
),
|
),
|
||||||
CFGLR_ELEMENT_BIN("tank_levels", NULL, 4, tank_levels, 4, CFGLR_SIGNALER_IDF_EVENT()),
|
CFGLR_ELEMENT_BIN("tank_levels", NULL, 4, tank_levels, 4, CFGLR_SIGNALER_IDF_EVENT()),
|
||||||
|
CFGLR_ELEMENT_BIN("pump_pins", NULL, 4, pump_gpio_map, 4, CFGLR_SIGNALER_IDF_EVENT()),
|
||||||
|
CFGLR_ELEMENT_BIN("pump_ramp_ms", NULL, sizeof(uint16_t) * 4, pump_ramp_ms, sizeof(uint16_t) * 4, CFGLR_SIGNALER_IDF_EVENT()),
|
||||||
{ NULL },
|
{ NULL },
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
@ -113,19 +116,23 @@ void app_main(void) {
|
||||||
|
|
||||||
uint8_t ret = cfglr_init(configulator);
|
uint8_t ret = cfglr_init(configulator);
|
||||||
|
|
||||||
|
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||||
|
|
||||||
|
user_button_init();
|
||||||
|
pumps_init();
|
||||||
|
|
||||||
baros_ble_cfg_t ble_cfg = {
|
baros_ble_cfg_t ble_cfg = {
|
||||||
.name = name,
|
.name = name,
|
||||||
};
|
};
|
||||||
|
|
||||||
baros_ble_init(&ble_cfg);
|
baros_ble_init(&ble_cfg);
|
||||||
|
|
||||||
user_button_init();
|
|
||||||
pumps_init();
|
|
||||||
|
|
||||||
led_init();
|
led_init();
|
||||||
|
|
||||||
uint16_t tick = 0;
|
uint16_t tick = 0;
|
||||||
|
|
||||||
|
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||||
|
|
||||||
printf(BARBACK_BANNER);
|
printf(BARBACK_BANNER);
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue