00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include <config.h>
00017 #if defined(CONF_DSENSOR)
00018
00019 #include <c++/Battery.H>
00020 #include <conio.h>
00021 #include <unistd.h>
00022 #include <tm.h>
00023
00024
00026
00027 int
00028 main(int argc,
00029 char **argv)
00030 {
00031 Battery b;
00032
00033 while (!shutdown_requested()) {
00034 cputs("batt");
00035 sleep(1);
00036 lcd_int(b.get());
00037 sleep(1);
00038 }
00039 return 0;
00040 }
00041
00042 #else
00043 #warning batt.C requires CONF_DSENSOR
00044 #warning batt demo will do nothing
00045 int main(int argc, char *argv[]) {
00046 return 0;
00047 }
00048 #endif // CONF_DSENSOR