Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save DurvalMenezes/0ecced94e2804b87ee43ac98336d1a30 to your computer and use it in GitHub Desktop.
Save DurvalMenezes/0ecced94e2804b87ee43ac98336d1a30 to your computer and use it in GitHub Desktop.
index 7356666..5cbb897 100644
--- a/ui/anduril/aux-leds.c
+++ b/ui/anduril/aux-leds.c
@@ -71,6 +71,16 @@ uint8_t voltage_to_rgb() {
20*dV, 0, // black
#endif
// li-ion voltages
+#ifdef MANULOVICH_PREFS_FOR_VOLTAGE_TO_RGB //See https://budgetlightforum.com/t/anduril-2-feature-change-suggestions/218045/776
+ 30*dV, 1, // R
+ 34*dV, 2, // R+G
+ 37*dV, 3, // G
+ 39*dV, 4, // G+B
+ 40*dV, 5, // B
+ 41*dV, 6, // R + B
+ 44*dV, 7, // R+G+B // skip; looks too similar to G+B
+ 255, 7, // R+G+B
+#else
29*dV, 1, // R
33*dV, 2, // R+G
35*dV, 3, // G
@@ -79,6 +89,7 @@ uint8_t voltage_to_rgb() {
41*dV, 6, // R + B
44*dV, 7, // R+G+B // skip; looks too similar to G+B
255, 7, // R+G+B
+#endif
};
uint8_t volts = voltage;
//if (volts < VOLTAGE_LOW) return 0;
diff --git a/ui/anduril/config-default.h b/ui/anduril/config-default.h
index 1b34e8c..62ba957 100644
--- a/ui/anduril/config-default.h
+++ b/ui/anduril/config-default.h
@@ -215,3 +215,6 @@
// (but allow disabling this feature per build)
#define USE_CHANNEL_PER_STROBE
+
+//Use Manulovich@BLF preferences for colors on the RGB voltage indicator, see https://budgetlightforum.com/t/anduril-2-feature-change-suggestions/218045/776
+#define MANULOVICH_PREFS_FOR_VOLTAGE_TO_RGB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment