Fix when setting options and taking VIDPID values.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2024-06-21 22:07:28 +02:00
parent f8480291fe
commit 246ed5cf19
3 changed files with 14 additions and 6 deletions

View File

@@ -432,7 +432,9 @@ int main(void) {
#ifdef ESP_PLATFORM
uint8_t gpio = GPIO_NUM_48;
if (file_has_data(ef_phy)) {
gpio = file_get_data(ef_phy)[PHY_LED_GPIO];
if (file_read_uint8_offset(ef_phy, PHY_OPTS + 1) & PHY_OPT_GPIO) {
gpio = file_get_data(ef_phy)[PHY_LED_GPIO];
}
}
neopixel = neopixel_Init(1, gpio);
#endif