summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/debug_menu.c4
-rw-r--r--apps/recorder/icons.c4
-rw-r--r--firmware/powermgmt.c6
3 files changed, 8 insertions, 6 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 12f5e059e0..aa232f9331 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -801,6 +801,7 @@ bool view_battery(void)
801 case 3: /* remeining time estimation: */ 801 case 3: /* remeining time estimation: */
802 lcd_clear_display(); 802 lcd_clear_display();
803 803
804#ifdef HAVE_CHARGE_CTRL
804 snprintf(buf, 30, "charge_state: %d", charge_state); 805 snprintf(buf, 30, "charge_state: %d", charge_state);
805 lcd_puts(0, 0, buf); 806 lcd_puts(0, 0, buf);
806 807
@@ -809,6 +810,7 @@ bool view_battery(void)
809 810
810 snprintf(buf, 30, "Lev.at cycle start: %d%%", powermgmt_last_cycle_level); 811 snprintf(buf, 30, "Lev.at cycle start: %d%%", powermgmt_last_cycle_level);
811 lcd_puts(0, 2, buf); 812 lcd_puts(0, 2, buf);
813#endif
812 814
813 snprintf(buf, 30, "Last PwrHist val: %d.%02d V", 815 snprintf(buf, 30, "Last PwrHist val: %d.%02d V",
814 power_history[POWER_HISTORY_LEN-1] / 100, 816 power_history[POWER_HISTORY_LEN-1] / 100,
@@ -821,9 +823,9 @@ bool view_battery(void)
821 snprintf(buf, 30, "Est. remaining: %d m", battery_time()); 823 snprintf(buf, 30, "Est. remaining: %d m", battery_time());
822 lcd_puts(0, 6, buf); 824 lcd_puts(0, 6, buf);
823 825
826#ifdef HAVE_CHARGE_CTRL
824 snprintf(buf, 30, "Trickle sec: %d/60", trickle_sec); 827 snprintf(buf, 30, "Trickle sec: %d/60", trickle_sec);
825 lcd_puts(0, 7, buf); 828 lcd_puts(0, 7, buf);
826#ifdef HAVE_CHARGE_CTRL
827#endif 829#endif
828 break; 830 break;
829 } 831 }
diff --git a/apps/recorder/icons.c b/apps/recorder/icons.c
index 2a9c00647b..acd6d6de4b 100644
--- a/apps/recorder/icons.c
+++ b/apps/recorder/icons.c
@@ -166,8 +166,12 @@ void statusbar_icon_battery(int percent, bool charging)
166#ifdef SIMULATOR 166#ifdef SIMULATOR
167 if (global_settings.battery_type) { 167 if (global_settings.battery_type) {
168#else 168#else
169#ifdef HAVE_CHARGE_CTRL /* Recorder */
169 /* show graphical animation when charging instead of numbers */ 170 /* show graphical animation when charging instead of numbers */
170 if ((global_settings.battery_type) && (charge_state != 1)) { 171 if ((global_settings.battery_type) && (charge_state != 1)) {
172#else /* FM */
173 if (global_settings.battery_type) {
174#endif /* HAVE_CHARGE_CTRL */
171#endif 175#endif
172 /* Numeric display */ 176 /* Numeric display */
173 snprintf(buffer, sizeof(buffer), "%3d", percent); 177 snprintf(buffer, sizeof(buffer), "%3d", percent);
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c
index 026bfe47c0..ae8b7445a8 100644
--- a/firmware/powermgmt.c
+++ b/firmware/powermgmt.c
@@ -105,13 +105,9 @@ int charge_state = 0; /* at the beginning, the charger
105 105
106static int percent_to_volt_charge[11] = /* voltages (centivolt) of 0%, 10%, ... 100% when charging enabled */ 106static int percent_to_volt_charge[11] = /* voltages (centivolt) of 0%, 10%, ... 100% when charging enabled */
107{ 107{
108#ifdef HAVE_LIION
109 /* values guessed, see http://www.seattlerobotics.org/encoder/200210/LiIon2.pdf */ 108 /* values guessed, see http://www.seattlerobotics.org/encoder/200210/LiIon2.pdf */
110 /* until someone measures voltages over a charging cycle */ 109 /* until someone measures voltages over a charging cycle */
111 260, 290, 320, 340, 360, 370, 380, 390, 400, 410, 420 110 476, 544, 551, 556, 561, 564, 566, 576, 582, 584, 585 /* NiMH */
112#else /* NiMH */
113 476, 544, 551, 556, 561, 564, 566, 576, 582, 584, 585
114#endif
115}; 111};
116 112
117void enable_trickle_charge(bool on) 113void enable_trickle_charge(bool on)