Skip to content

Commit

Permalink
Merge pull request #1616 from Ralim/discip-patch-1
Browse files Browse the repository at this point in the history
implementing #1594
  • Loading branch information
discip authored Apr 1, 2023
2 parents dcfb650 + 0bbf8fb commit e5e77aa
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions source/Core/BSP/Pinecilv2/ble_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,18 @@ int ble_char_write_setting_value_callback(struct bt_conn *conn, const struct bt_
}
} else if (uuid_value < SettingsOptions::SettingsOptionsLength) {
setSettingValue((SettingsOptions)(uuid_value), new_value);
// @TODO refactor to make this more usable
if (uuid_value == SettingsOptions::OLEDInversion) {
switch (uuid_value) {
case SettingsOptions::OLEDInversion:
OLED::setInverseDisplay(getSettingValue(SettingsOptions::OLEDInversion));
}
if (uuid_value == SettingsOptions::OLEDBrightness) {
break;
case SettingsOptions::OLEDBrightness:
OLED::setBrightness(getSettingValue(SettingsOptions::OLEDBrightness));
}
if (uuid_value == SettingsOptions::OrientationMode) {
break;
case SettingsOptions::OrientationMode:
OLED::setRotation(getSettingValue(SettingsOptions::OrientationMode) & 1);
break;
default:
break;
}
return len;
}
Expand Down

0 comments on commit e5e77aa

Please sign in to comment.