Thank you to anyone who has already donated - your generous donations helped make three months of treatment possible.

My brother Nate continues to fight stage IV Hodgkin's lymphoma. He's just 31, with a wife and baby girl. They have no active income (since he's been unable to return to work), no insurance, and cannot afford the treatment he needs. Nate and his family need your help. Please consider a donation, every dollar helps. Thanks.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
diff --git a/firmware/export/config-yh925.h b/firmware/export/config-yh925.h
index bd15b5a..fdf2db7 100644
--- a/firmware/export/config-yh925.h
+++ b/firmware/export/config-yh925.h
@@ -131,18 +131,15 @@

 #define AB_REPEAT_ENABLE 1

-#define BATTERY_CAPACITY_DEFAULT 1550 /* default battery capacity */
-#define BATTERY_CAPACITY_MIN 1500  /* min. capacity selectable */
-#define BATTERY_CAPACITY_MAX 3200 /* max. capacity selectable */
+#define BATTERY_CAPACITY_DEFAULT 900 /* default battery capacity */
+#define BATTERY_CAPACITY_MIN 750  /* min. capacity selectable */
+#define BATTERY_CAPACITY_MAX 900 /* max. capacity selectable */
 #define BATTERY_CAPACITY_INC 50   /* capacity increment */
 #define BATTERY_TYPES_COUNT  1    /* only one type */

 /* Hardware controlled charging */
 #define CONFIG_CHARGING CHARGING_SIMPLE

-/* define this if the unit can be powered or charged via USB */
-#define HAVE_USB_POWER
-
 #ifndef SIMULATOR

 /* Define this if you have a PortalPlayer PP5020 */
diff --git a/firmware/target/arm/samsung/adc-target.h b/firmware/target/arm/samsung/adc-target.h
index a95bcd2..1f6a9dc 100644
--- a/firmware/target/arm/samsung/adc-target.h
+++ b/firmware/target/arm/samsung/adc-target.h
@@ -28,7 +28,7 @@
 #define ADC_CHANNEL_2   2
 #define ADC_CHANNEL_3   3

-#define ADC_BATTERY     ADC_CHANNEL_0
+#define ADC_BATTERY     ADC_CHANNEL_1
 /*
 #define ADC_UNKNOWN_1   1
 #define ADC_REMOTE      2
diff --git a/firmware/target/arm/samsung/yh925/powermgmt-yh925.c b/firmware/target/arm/samsung/yh925/powermgmt-yh925.c
index 6d7e348..9a16278 100644
--- a/firmware/target/arm/samsung/yh925/powermgmt-yh925.c
+++ b/firmware/target/arm/samsung/yh925/powermgmt-yh925.c
@@ -39,13 +39,13 @@ const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] =
 /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */
 const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
 {
-    { 3733, 3772, 3821, 3840, 3869, 3917, 3985, 4034, 4072, 4140, 4198 }
+    { 3733, 3772, 3821, 3840, 3869, 3917, 3985, 4034, 4072, 4140, 4190 }
 };

 /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
-const unsigned short percent_to_volt_charge[11] =
+const unsigned short percent_to_volt_charge[11] =7
 {
-    3956, 3995, 4024, 4043, 4063, 4082, 4111, 4140, 4179, 4218, 4266
+    3956, 3995, 4024, 4043, 4063, 4082, 4111, 4140, 4179, 4218, 4300
 };

 #define BATTERY_SCALE_FACTOR 4650
@@ -54,6 +54,5 @@ const unsigned short percent_to_volt_charge[11] =
 /* Returns battery voltage from ADC [millivolts] */
 unsigned int battery_adc_voltage(void)
 {
-    /* return (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) >> 10; */
-    return 4100;
+    return (adc_read(ADC_BATTERY) * BATTERY_SCALE_FACTOR) >> 10;
 }