Core2 M5Unified independence + general fixes (#142)
- Change init sequence: I2C is now initialized before "power" init phase, to allow for I2C power control - I2c HAL: Added read/write support for registers - Added axp192 code from https://github.com/tuupola/axp192 to Core2 implementation - Fixes for Core2Power - Fix for root project CMakeLists.txt
This commit is contained in:
committed by
GitHub
parent
9581978fc7
commit
3214923425
@@ -53,7 +53,7 @@ static void updateUi(std::shared_ptr<Data> data) {
|
||||
}
|
||||
|
||||
bool charging_enabled_set = data->power->supportsChargeControl();
|
||||
bool charging_enabled = data->power->supportsChargeControl() && data->power->isAllowedToCharge();
|
||||
bool charging_enabled_and_allowed = data->power->supportsChargeControl() && data->power->isAllowedToCharge();
|
||||
|
||||
int32_t current;
|
||||
bool current_set = false;
|
||||
@@ -72,7 +72,7 @@ static void updateUi(std::shared_ptr<Data> data) {
|
||||
lvgl::lock(kernel::millisToTicks(1000));
|
||||
|
||||
if (charging_enabled_set) {
|
||||
lv_obj_set_state(data->enable_switch, LV_STATE_CHECKED, charging_enabled);
|
||||
lv_obj_set_state(data->enable_switch, LV_STATE_CHECKED, charging_enabled_and_allowed);
|
||||
lv_obj_remove_flag(data->enable_switch, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_obj_remove_flag(data->enable_label, LV_OBJ_FLAG_HIDDEN);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user