feat: ping pong.
This commit is contained in:
parent
05660afc54
commit
0f5e2a9664
@ -85,6 +85,8 @@ void led_strip_set_color_calibration(float red, float green, float blue) {
|
|||||||
led_strip_green_calibration = green;
|
led_strip_green_calibration = green;
|
||||||
led_strip_blue_calibration = blue;
|
led_strip_blue_calibration = blue;
|
||||||
|
|
||||||
|
ESP_LOGI(LIGHT_TAG, "Calibration: %f %f %f", red, green, blue);
|
||||||
|
|
||||||
nvs_handle_t local_nvs_handle;
|
nvs_handle_t local_nvs_handle;
|
||||||
|
|
||||||
esp_err_t err = nvs_open("storage", NVS_READWRITE, &local_nvs_handle);
|
esp_err_t err = nvs_open("storage", NVS_READWRITE, &local_nvs_handle);
|
||||||
|
18
main/main.c
18
main/main.c
@ -29,15 +29,15 @@ void app_main(void) {
|
|||||||
init_display();
|
init_display();
|
||||||
display_print8_str(0, 0, "Ambient Light");
|
display_print8_str(0, 0, "Ambient Light");
|
||||||
|
|
||||||
// ci_03t_init();
|
ci_03t_init();
|
||||||
// apds_9960_init();
|
apds_9960_init();
|
||||||
// apds_9960_auto_fetch();
|
apds_9960_auto_fetch();
|
||||||
// auto_fetch_temperature();
|
auto_fetch_temperature();
|
||||||
// pca9555_init();
|
pca9555_init();
|
||||||
// ui_input_init();
|
ui_input_init();
|
||||||
// xTaskCreate(mqtt_publish_ui_input, "mqtt_publish_ui_input", 2048, NULL, 10,
|
xTaskCreate(mqtt_publish_ui_input, "mqtt_publish_ui_input", 2048, NULL, 10,
|
||||||
// NULL);
|
NULL);
|
||||||
// vTaskDelay(pdMS_TO_TICKS(10));
|
vTaskDelay(pdMS_TO_TICKS(10));
|
||||||
light_play(light_mode_connection_wifi);
|
light_play(light_mode_connection_wifi);
|
||||||
if (connect_wifi()) {
|
if (connect_wifi()) {
|
||||||
light_play(light_mode_idle);
|
light_play(light_mode_idle);
|
||||||
|
@ -83,6 +83,11 @@ static void udp_server_task(void *pvParameters) {
|
|||||||
// like a string...
|
// like a string...
|
||||||
|
|
||||||
switch (rx_buffer[0]) {
|
switch (rx_buffer[0]) {
|
||||||
|
case 1:
|
||||||
|
sendto(sock, rx_buffer, 1, 0, (struct sockaddr *)&source_addr,
|
||||||
|
sizeof(source_addr));
|
||||||
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
set_display_ambient_light_colors(
|
set_display_ambient_light_colors(
|
||||||
((uint16_t)rx_buffer[1] << 8 | (uint16_t)rx_buffer[2]),
|
((uint16_t)rx_buffer[1] << 8 | (uint16_t)rx_buffer[2]),
|
||||||
|
Loading…
Reference in New Issue
Block a user