From 92c1aaefbeb6ee1539ef1cc0f886a919362db804 Mon Sep 17 00:00:00 2001 From: Joerg Lehmann Date: Sat, 29 Feb 2020 11:38:17 +0100 Subject: [PATCH] use NA to disable load cell in calibration command --- mini-beieli-node.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mini-beieli-node.ino b/mini-beieli-node.ino index c2f4c52..6aaf43d 100644 --- a/mini-beieli-node.ino +++ b/mini-beieli-node.ino @@ -1355,7 +1355,7 @@ cCommandStream::CommandStatus cmdCalibrateScaleA(cCommandStream *pThis, void *pC String w1_gramm(argv[1]); long weight1; - if (w1_gramm.toFloat() == -1.0) { + if (w1_gramm == "NA") { // scale a is not connected config_data.cal_w1_factor = 0.0; config_data.cal_w1_0 = NOT_ATTACHED; @@ -1377,8 +1377,8 @@ cCommandStream::CommandStatus cmdCalibrateScaleB(cCommandStream *pThis, void *pC String w2_gramm(argv[1]); long weight2; - if (w2_gramm.toFloat() == -1.0) { - // scale a is not connected + if (w2_gramm == "NA") { + // scale b is not connected config_data.cal_w2_factor = 0.0; config_data.cal_w2_0 = NOT_ATTACHED; } else {