diff options
Diffstat (limited to 'src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c')
-rw-r--r-- | src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c | 45 |
1 files changed, 10 insertions, 35 deletions
diff --git a/src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c b/src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c index 7e80e030..10dda21f 100644 --- a/src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c +++ b/src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c @@ -1,5 +1,5 @@ /* Copyright (C) 2015 by Yves Godin <support@nuranwireless.com> - * + * * Based on sysmoBTS: * sysmobts_mgr_vty.c * (C) 2014 by oc2gcom - s.f.m.c. GmbH @@ -16,7 +16,7 @@ * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. @@ -86,35 +86,10 @@ static int go_to_parent(struct vty *vty) return vty->node; } -static int is_config_node(struct vty *vty, int node) -{ - switch (node) { - case MGR_NODE: - case ACT_NORM_NODE: - case ACT_WARN_NODE: - case ACT_CRIT_NODE: - case LIMIT_SUPPLY_TEMP_NODE: - case LIMIT_SOC_NODE: - case LIMIT_FPGA_NODE: - case LIMIT_RMSDET_NODE: - case LIMIT_OCXO_NODE: - case LIMIT_TX_TEMP_NODE: - case LIMIT_PA_TEMP_NODE: - case LIMIT_SUPPLY_VOLT_NODE: - case LIMIT_VSWR_NODE: - case LIMIT_SUPPLY_PWR_NODE: - case LIMIT_PA_PWR_NODE: - return 1; - default: - return 0; - } -} - static struct vty_app_info vty_info = { .name = "oc2gbts-mgr", .version = PACKAGE_VERSION, .go_parent_cb = go_to_parent, - .is_config_node = is_config_node, .copyright = copyright, }; @@ -512,35 +487,35 @@ DEFUN(show_mgr, show_mgr_cmd, "show manager", oc2gbts_mgr_sensor_get_state(s_mgr->state.state), VTY_NEWLINE); vty_out(vty, "Current Temperatures%s", VTY_NEWLINE); oc2gbts_temp_get(OC2GBTS_TEMP_SUPPLY, &temp); - vty_out(vty, " Main Supply : %4.2f Celcius%s", + vty_out(vty, " Main Supply : %4.2f Celsius%s", temp/ 1000.0f, VTY_NEWLINE); oc2gbts_temp_get(OC2GBTS_TEMP_SOC, &temp); - vty_out(vty, " SoC : %4.2f Celcius%s", + vty_out(vty, " SoC : %4.2f Celsius%s", temp / 1000.0f, VTY_NEWLINE); oc2gbts_temp_get(OC2GBTS_TEMP_FPGA, &temp); - vty_out(vty, " FPGA : %4.2f Celcius%s", + vty_out(vty, " FPGA : %4.2f Celsius%s", temp / 1000.0f, VTY_NEWLINE); if (oc2gbts_option_get(OC2GBTS_OPTION_RMS_FWD) || oc2gbts_option_get(OC2GBTS_OPTION_RMS_REFL)) { oc2gbts_temp_get(OC2GBTS_TEMP_RMSDET, &temp); - vty_out(vty, " RMSDet : %4.2f Celcius%s", + vty_out(vty, " RMSDet : %4.2f Celsius%s", temp / 1000.0f, VTY_NEWLINE); } oc2gbts_temp_get(OC2GBTS_TEMP_OCXO, &temp); - vty_out(vty, " OCXO : %4.2f Celcius%s", + vty_out(vty, " OCXO : %4.2f Celsius%s", temp / 1000.0f, VTY_NEWLINE); oc2gbts_temp_get(OC2GBTS_TEMP_TX, &temp); - vty_out(vty, " TX : %4.2f Celcius%s", + vty_out(vty, " TX : %4.2f Celsius%s", temp / 1000.0f, VTY_NEWLINE); if (oc2gbts_option_get(OC2GBTS_OPTION_PA_TEMP)) { oc2gbts_temp_get(OC2GBTS_TEMP_PA, &temp); - vty_out(vty, " Power Amp : %4.2f Celcius%s", + vty_out(vty, " Power Amp : %4.2f Celsius%s", temp / 1000.0f, VTY_NEWLINE); } @@ -649,7 +624,7 @@ DEFUN(show_thresh, show_thresh_cmd, "show thresholds", DEFUN(calibrate_clock, calibrate_clock_cmd, "calibrate clock", - "Calibration commands\n" + "Calibration commands\n" "Calibrate clock against GPS PPS\n") { if (oc2gbts_mgr_calib_run(s_mgr) < 0) { |