FreeCalypso > hg > freecalypso-tools
changeset 754:2cd5ac909e23
fc-fsio write-battery-table replaced with write-battery-table-{v1,v2}
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 05 Nov 2020 22:32:51 +0000 |
parents | cae22bec3cba |
children | 28d58a8cd704 |
files | rvinterf/etmsync/fscmdtab.c rvinterf/etmsync/fsnew.c |
diffstat | 2 files changed, 15 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/rvinterf/etmsync/fscmdtab.c Thu Nov 05 22:07:13 2020 +0000 +++ b/rvinterf/etmsync/fscmdtab.c Thu Nov 05 22:32:51 2020 +0000 @@ -34,7 +34,8 @@ extern int cmd_upload_file(); extern int cmd_upload_rf_table(); extern int cmd_upload_subtree(); -extern int cmd_write_battery_table(); +extern int cmd_write_battery_table_v1(); +extern int cmd_write_battery_table_v2(); extern int cmd_write_charging_config(); extern int create_std_dirs(); @@ -77,7 +78,8 @@ {"upload-fs", 1, 1, cmd_uploadfs}, {"upload-rf-table", 1, 2, cmd_upload_rf_table}, {"upload-subtree", 2, 2, cmd_upload_subtree}, - {"write-battery-table", 1, 1, cmd_write_battery_table}, + {"write-battery-table-v1", 1, 1, cmd_write_battery_table_v1}, + {"write-battery-table-v2", 1, 1, cmd_write_battery_table_v2}, {"write-charging-config", 1, 1, cmd_write_charging_config}, {0, 0, 0, 0} };
--- a/rvinterf/etmsync/fsnew.c Thu Nov 05 22:07:13 2020 +0000 +++ b/rvinterf/etmsync/fsnew.c Thu Nov 05 22:32:51 2020 +0000 @@ -9,8 +9,9 @@ #include <unistd.h> #include "exitcodes.h" -char batterytab_compile_tool[] = "/opt/freecalypso/bin/compile-fc-batt"; -char charging_compile_tool[] = "/opt/freecalypso/bin/compile-fc-chg"; +char batterytab_compile_tool[] = "/opt/freecalypso/bin/compile-fc-batt"; +char batterytab2_compile_tool[] = "/opt/freecalypso/bin/compile-fc-batt2"; +char charging_compile_tool[] = "/opt/freecalypso/bin/compile-fc-chg"; upload_fc_table_from_ascii(asciisrc, compiletool, ffs_pathname) char *asciisrc, *compiletool, *ffs_pathname; @@ -53,13 +54,20 @@ return rc; } -cmd_write_battery_table(argc, argv) +cmd_write_battery_table_v1(argc, argv) char **argv; { return upload_fc_table_from_ascii(argv[1], batterytab_compile_tool, "/etc/batterytab"); } +cmd_write_battery_table_v2(argc, argv) + char **argv; +{ + return upload_fc_table_from_ascii(argv[1], batterytab2_compile_tool, + "/etc/batterytab2"); +} + cmd_write_charging_config(argc, argv) char **argv; {