summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/action.c2
-rw-r--r--apps/gui/list.c13
-rwxr-xr-xapps/keymaps/keymap-mr500.c6
-rwxr-xr-xfirmware/target/arm/tms320dm320/mrobe-500/powermgmt-mr500.c8
4 files changed, 23 insertions, 6 deletions
diff --git a/apps/action.c b/apps/action.c
index 989313f41c..7f445c8b9f 100644
--- a/apps/action.c
+++ b/apps/action.c
@@ -301,6 +301,6 @@ int action_get_touchpad_press(short *x, short *y)
301 return BUTTON_REPEAT; 301 return BUTTON_REPEAT;
302 if (short_press) 302 if (short_press)
303 return BUTTON_REL; 303 return BUTTON_REL;
304 return BUTTON_NONE; 304 return BUTTON_TOUCHPAD;
305} 305}
306#endif 306#endif
diff --git a/apps/gui/list.c b/apps/gui/list.c
index e7de12c4a0..6f61a61992 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -918,6 +918,8 @@ unsigned gui_synclist_do_touchpad(struct gui_synclist * lists)
918 short x,y; 918 short x,y;
919 unsigned button = action_get_touchpad_press(&x, &y); 919 unsigned button = action_get_touchpad_press(&x, &y);
920 int line; 920 int line;
921 if (button == BUTTON_NONE)
922 return ACTION_NONE;
921 if (x<SCROLLBAR_WIDTH) 923 if (x<SCROLLBAR_WIDTH)
922 { 924 {
923 /* top left corner is hopefully GO_TO_ROOT */ 925 /* top left corner is hopefully GO_TO_ROOT */
@@ -956,7 +958,16 @@ unsigned gui_synclist_do_touchpad(struct gui_synclist * lists)
956 else 958 else
957 { 959 {
958 if (button != BUTTON_REL && button != BUTTON_REPEAT) 960 if (button != BUTTON_REL && button != BUTTON_REPEAT)
959 return ACTION_NONE; 961 {
962 if (global_settings.statusbar)
963 y -= STATUSBAR_HEIGHT;
964 if (SHOW_LIST_TITLE)
965 y -= gui_list->display->char_height;
966 line = y / gui_list->display->char_height;
967 if (line != gui_list->selected_item - gui_list->start_item)
968 gui_synclist_select_item(lists, gui_list->start_item+line);
969 return ACTION_REDRAW;
970 }
960 /* title or statusbar is cancel */ 971 /* title or statusbar is cancel */
961 if (global_settings.statusbar) 972 if (global_settings.statusbar)
962 { 973 {
diff --git a/apps/keymaps/keymap-mr500.c b/apps/keymaps/keymap-mr500.c
index b2444c5fad..b0d75c15bf 100755
--- a/apps/keymaps/keymap-mr500.c
+++ b/apps/keymaps/keymap-mr500.c
@@ -86,6 +86,12 @@ static const struct button_mapping button_context_listtree_scroll_without_combo[
86}; 86};
87 87
88static const struct button_mapping button_context_settings[] = { 88static const struct button_mapping button_context_settings[] = {
89 { ACTION_SETTINGS_INC, BUTTON_RC_VOL_UP, BUTTON_NONE },
90 { ACTION_SETTINGS_INCREPEAT, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
91 { ACTION_SETTINGS_DEC, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
92 { ACTION_SETTINGS_DECREPEAT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
93 { ACTION_STD_OK, BUTTON_RC_HEART, BUTTON_NONE },
94 { ACTION_STD_CANCEL, BUTTON_RC_MODE, BUTTON_NONE },
89 95
90 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) 96 LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
91}; /* button_context_settings */ 97}; /* button_context_settings */
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/powermgmt-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/powermgmt-mr500.c
index 0f85a5b007..566a57d285 100755
--- a/firmware/target/arm/tms320dm320/mrobe-500/powermgmt-mr500.c
+++ b/firmware/target/arm/tms320dm320/mrobe-500/powermgmt-mr500.c
@@ -26,24 +26,24 @@
26unsigned short current_voltage = 3910; 26unsigned short current_voltage = 3910;
27const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] = 27const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] =
28{ 28{
29 3450 29 0
30}; 30};
31 31
32const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 32const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] =
33{ 33{
34 3400 34 0
35}; 35};
36 36
37/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 37/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */
38const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 38const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
39{ 39{
40 { 3480, 3550, 3590, 3610, 3630, 3650, 3700, 3760, 3800, 3910, 3990 }, 40 { 100, 300, 400, 500, 600, 700, 800, 900, 1000, 1200, 1320 },
41}; 41};
42 42
43/* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */ 43/* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
44const unsigned short percent_to_volt_charge[11] = 44const unsigned short percent_to_volt_charge[11] =
45{ 45{
46 3480, 3550, 3590, 3610, 3630, 3650, 3700, 3760, 3800, 3910, 3990 46 100, 300, 400, 500, 600, 700, 800, 900, 1000, 1200, 1320,
47}; 47};
48void read_battery_inputs(void) 48void read_battery_inputs(void)
49{ 49{