Problem: Partly an extension of gh-2, the CLI tuning code, while still in the works in cli-tune, is currently a large function being called in opcontrol(); this makes the functionality of the program a bit dubious at first glance. It also pollutes main.cpp with utility functions like split() and makeLowerCase(). Thirdly, since most of this code is in main.cpp, it also exposes a lot of low-level interactions that make the functioning of main.cpp appear even more murky.
Significance: If a lot of the functionality of CLI-tune is moved to a different file, this will significantly improve the readability of main.cpp, in addition to allowing the CLI function(s) to interact with other classes, such as the Robot class mentioned in gh-2 (that is, it can interface with the Robot class to, say, set PID constants or modify slew values).
Solution: I propose that a new class, CLITuner (preliminary name—can be changed!), be made (in a separate file), that essentially has most of the functions in the current CLI-tuning collection, but allows them (and their corresponding state variables) to be accessed by other classes!
Problem: Partly an extension of gh-2, the CLI tuning code, while still in the works in cli-tune, is currently a large function being called in
opcontrol()
; this makes the functionality of the program a bit dubious at first glance. It also pollutesmain.cpp
with utility functions likesplit()
andmakeLowerCase()
. Thirdly, since most of this code is inmain.cpp
, it also exposes a lot of low-level interactions that make the functioning ofmain.cpp
appear even more murky. Significance: If a lot of the functionality of CLI-tune is moved to a different file, this will significantly improve the readability ofmain.cpp
, in addition to allowing the CLI function(s) to interact with other classes, such as theRobot
class mentioned in gh-2 (that is, it can interface with theRobot
class to, say, set PID constants or modify slew values). Solution: I propose that a new class, CLITuner (preliminary name—can be changed!), be made (in a separate file), that essentially has most of the functions in the current CLI-tuning collection, but allows them (and their corresponding state variables) to be accessed by other classes!