MaslowCNC/GroundControl

Z-Axis Pitch allows invalid input

Opened this issue · 2 comments

First, this is a postmortem, I don't know how I actually got in this state but probably explains my disastrous Z-Axis calibration on Friday.

Today, upon opening Ground Control 1.11 and opening the Settings tabs the app crashes.

[5748] Failed to execute script main
 Traceback (most recent call last):
   File "C:\Users\Bar\Git\GroundControl\main.py", line 445, in <module>
     GroundControlApp().run()
   File "C:\Python27\lib\site-packages\kivy\app.py", line 828, in run
   File "C:\Python27\lib\site-packages\kivy\base.py", line 504, in runTouchApp
   File "C:\Python27\lib\site-packages\kivy\core\window\window_sdl2.py", line 663, in mainloop
   File "C:\Python27\lib\site-packages\kivy\core\window\window_sdl2.py", line 405, in _mainloop
   File "C:\Python27\lib\site-packages\kivy\base.py", line 339, in idle
   File "C:\Python27\lib\site-packages\kivy\clock.py", line 581, in tick
   File "kivy\_clock.pyx", line 367, in kivy._clock.CyClockBase._process_events (kivy\_clock.c:7700)
   File "kivy\_clock.pyx", line 397, in kivy._clock.CyClockBase._process_events (kivy\_clock.c:7577)
   File "kivy\_clock.pyx", line 395, in kivy._clock.CyClockBase._process_events (kivy\_clock.c:7498)
   File "kivy\_clock.pyx", line 167, in kivy._clock.ClockEvent.tick (kivy\_clock.c:3490)
   File "C:\Users\Bar\Git\GroundControl\main.py", line 305, in runPeriodically
     self.receivedSetting(message)
   File "C:\Users\Bar\Git\GroundControl\main.py", line 265, in receivedSetting
     maslowSettings.syncFirmwareKey(int(parameter), value, self.data)
   File "C:\Users\Bar\Git\GroundControl\Settings\maslowSettings.py", line 556, in syncFirmwareKey
 ValueError: invalid literal for float(): 0.062501.588 1.588 1.588

As you can see, the value is correctly an invalid float.
Checking my groundcontrol.ini and I can see the value go stored incorrectly.

zdistperrot = 0.062501.588
             1.588
             1.588

At a guess, it is because I was trying to use my keyboard or number pad instead of the onscreen number pad. I'm going to run through the process again tomorrow with 1.12 to see if it's still present.

This also might be related to #617

I think I've figured it out. Because the input doesn't appear to be getting validated, it's possible to paste a carriage return into the field. I was probably doing in>mm conversions on the command line and accidentally picked up an invisible character.

This is also still present in 1.12