separated the socket routes into submodules in which each submodule uses its own namespace:
gps routes live in gps.py using namespace /gps
drivetrain route lives in drive.py using namespace /drivetrain
imu (Inertial sensor) routes live in imu.py (also includes calc_heading(), calc_yaw_pitch_roll()~, & getHYPR()~) using namespace /imu
navigation route lives in navigation.py (formerly GPSnav.py) using no namespace as it is utilized directly by the server
virtual terminal routes live in virtual_terminal.py using namespace /pty
camera routes live in camera.py (formerly camera_manager.py) using namespace /camera
dropped compatibility with Windows and Linux webcams as this repository is meant to be run solely on a Raspberry Pi. Some Circuitpython devices support cameras, but usually require a special serialized connection.
dropped platform checking in lieu of the MCU's hard-coded pins (either aliased in firmware or aliased during installation of adafruit-blinka's board module). Note: converting a JSON string to a variable name is unsafe as it would require the use of Python's exec() function.
moved away from using flask-socketio towards python-socketio to minimize overhead and installation requirements (thanks to @tejashah88)
sockets.py renamed to server.py to act as a middleware server between webapp server and submodules/clients. This module includes variables to be passed as references when calling upon the Navigator class's functions for autonomous movement.
gps.py
using namespace/gps
drive.py
using namespace/drivetrain
imu.py
(also includescalc_heading()
,calc_yaw_pitch_roll()
~, &getHYPR()
~) using namespace/imu
navigation.py
(formerlyGPSnav.py
) using no namespace as it is utilized directly by the servervirtual_terminal.py
using namespace/pty
camera.py
(formerlycamera_manager.py
) using namespace/camera
adafruit-blinka
'sboard
module). Note: converting a JSON string to a variable name is unsafe as it would require the use of Python'sexec()
function.flask-socketio
towardspython-socketio
to minimize overhead and installation requirements (thanks to @tejashah88)sockets.py
renamed toserver.py
to act as a middleware server between webapp server and submodules/clients. This module includes variables to be passed as references when calling upon theNavigator
class's functions for autonomous movement.