From 3186b8ea7af6606b005d2f1469bc16e00081212f Mon Sep 17 00:00:00 2001 From: Barbudor Date: Sat, 3 Apr 2021 15:06:41 +0200 Subject: [PATCH] berry without USE_LIGHT raise excep --- tasmota/xdrv_52_3_berry_tasmota.ino | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tasmota/xdrv_52_3_berry_tasmota.ino b/tasmota/xdrv_52_3_berry_tasmota.ino index 4f172ee3d..baeed6adc 100644 --- a/tasmota/xdrv_52_3_berry_tasmota.ino +++ b/tasmota/xdrv_52_3_berry_tasmota.ino @@ -243,6 +243,7 @@ extern "C" { be_raise(vm, kTypeError, nullptr); } +#ifdef USE_LIGHT // push the light status object on the vm stack void push_getlight(bvm *vm, uint32_t light_num) { bool data_present = false; // do we have relevant data @@ -466,6 +467,10 @@ extern "C" { } be_raise(vm, kTypeError, nullptr); } // TODO +#else // #ifdef USE_LIGHT + int32_t l_getlight(bvm *vm) { be_raise(vm, "feature_error", "LIGHT is not enabled, use '#define USE_LIGHT'"); } + int32_t l_setlight(struct bvm *vm) __attribute__ ((weak, alias ("l_getlight"))); +#endif // #ifdef USE_LIGHT // get power int32_t l_getpower(bvm *vm);