Skip to content

RobinHeitz/rebel_transmission_assembly_system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rebel_transmission_assembly_system

This repo serves as an assembly aid for Rebel gearboxes. 'PySimpleGUI' is used as frontend, 'python-can' is used as driver for the PeakCAN USB Interface. For data saving SQLAlchemy is used as ORM-Tool (Object Relational Mapping) and sqlite as database. Alembic is a tool for database setup/ migration (change tables etc.).

use 'python start_app.py' in console to start GUI interface.

Prerequisite:

Structure of this repository

  • /alembic is stuff for database migration. You might not touch it.
  • /data_management defines data models, managed with SQLAlchemy
  • /hw_interface is the implementation for connecting/ controlling the ReBeL Gearbox.
  • /gui is stuff related to the gui (PySimpleGUI)
  • /testing_stuff for scripts testing single components before they got implemented in the gui-app

hw_interface.motor_controller.py

  • use class 'RebelAxisController' for connecting/ controlling rebel gear. After init, call method start_msg_listener_thread(). A thread is started which reads every message the BLDC-Board is sending. Access to this messages with properties 'movement_cmd_reply_list' (replies for movement commands; instances of MessageMovementCommandReply) and 'motor_env_status_list' (Non-cyclical environment status messages; instances of class MessageEnvironmentStatus)

Using alembic auto-migration:

alembic revision --autogenerate -m "my migration description" alembic upgrade head

SQLite databases are not made for altering relationship via migrations. Thus, if migration errors occure, it might be a good idea to delete all files within alembic/versions and delete the *.sqlite - file. Then use both commands above, revision and upgrade to make a clean db.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published