aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2011-06-15 15:45:12 +0200
committerDaniel Lezcano <daniel.lezcano@linaro.org>2011-06-15 15:45:12 +0200
commit40ba329c7b5a5e5ed5720fc5cc45e55d3992c463 (patch)
tree08a585f3ca48c386c7cdef90e5b1bd662a309211
parent971515ac1f76bf9402b048c970263dfe3ad923c1 (diff)
downloadpowerdebug-40ba329c7b5a5e5ed5720fc5cc45e55d3992c463.tar.gz
Encapsulate the display (8)
We don't have anymore a specific case for each pm block as we use some ops now. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r--powerdebug.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/powerdebug.c b/powerdebug.c
index 5ff675d..28b23b4 100644
--- a/powerdebug.c
+++ b/powerdebug.c
@@ -198,20 +198,16 @@ int mainloop(struct powerdebug_options *options)
struct timeval tval;
fd_set readfds;
- if (options->selectedwindow == REGULATOR)
- regulator_display();
-
- if (options->selectedwindow == SENSOR)
- sensor_display();
if (options->selectedwindow == CLOCK) {
if (enter_hit)
- clock_toggle_expanded();
-
- clock_display();
+ display_select();
enter_hit = false;
}
+ display_refresh();
+
+
FD_ZERO(&readfds);
FD_SET(0, &readfds);
tval.tv_sec = options->ticktime;