M5Station-485 - Get Battery Percentage - NameError



  • Hello @m5stack

    when I try to use the Get Battery Percentage Vmin / Vmax block (UIFlow 1.10.4)

    0_1661586675874_M5StationUIFlowBatPercentError_20220827.png

    I get the following error:

    Traceback (most recent call last):
      File "flow/m5cloud.py", line 76, in _exec_fun
      File "<string>", line 28, in <module>
    NameError: name 'map_value' isn't defined
    

    Thanks
    Felix



  • Hi,

    Did you added "from easyIO import * " at the beginning ?

    Fred



  • @felmue There is no batteries in the Station485
    However you may have also found a bug.



  • Hi guys

    @democrazia : thank you, adding from easyIO import * solved the issue. Thank you!

    @ajb2k3 : you are correct, the 485 stock version doesn't have batteries. However I don't think M5Stack engineers are planning to separate the two versions in UIFlow as there is only one M5Station to select from in UIFlow. So yes, it is a bug - instead of the error we should get 0.

    Thanks
    Felix