Sub Module lvac

fgui.lvac

A GUI to read the BMS values as well as control the BMS via CAN. The module can be called standalone by python -m fgui.lvac.

fgui.lvac.lvac_frame

Implements an app to view the CAN messages that come from the BMS and send CAN messages to the BMS to control the BMS behavior.

class fgui.lvac.lvac_frame.LiveViewAndControlMainFrame(parent=None, can_process: Union[None, fgui.workers.can_node_worker.CanAdapterProcess] = None)

Control frame of LVAC

CloseFrameSafely(event: wx._core.Event)

Close the frame safely:

  • move the CAN process to idle state

  • tell the process, that this(!) app has been canceled

  • Destroy all generated sub frames

  • stop all threads that where used to update the GUI

disable_controls()

Disable all control buttons

enable_controls()

Enable all control buttons

onLvacFocus(event: wx._core.Event)

Focus all LVAC frames and bring them to top

select_mode_ca(event=None)

Sets the requested BMS mode

select_mode_cb(event=None)

wrapper to retrieve the requested BMS mode bay an CallAfter function.

set_send_data() Optional[list[can.message.Message]]

Returns CAN messages to be sent, composed with information obtained from the GUI.

start_process()

Used to inform CAN process, that the App has started, and the process should no longer be paused.

start_threads()

Start the GUI sync threads.

stop_process()

Used to inform CAN process, that the App is paused.

stop_thread()

Stop the GUI sync threads.

thread_wrapper_cb(event=None)

Start/Stop the threads

update_process_label(value: can.message.Message)

Calls some callbacks that update the respective GUI elements.

worker_process_function(value)

wrapper to call the GUI update function as an CallAfter function.

fgui.lvac.default_messages

Wrapper to retrieve several messages from the DBC file. This should help to keep most of the ‘message’-configuration out of the GUI implementation.

fgui.lvac.cell_temperatures

Table to display the cell temperatures

class fgui.lvac.cell_temperatures.CellTemperatureFrame(title, parent=None, dbc: Optional[cantools.database.can.database.Database] = None, strings=1, modules=8, temps_per_module=4, pos=None)

Frame to display the cell temperatures in a table.

Destroy()

Unbind normal destroy

NewDestroy()

Destroys the frame

update_cell_temperatures(value: can.message.Message)

Updates the table cell entries with the current temperature values

fgui.lvac.cell_voltages

Table to display the cell voltages

class fgui.lvac.cell_voltages.CellVoltageFrame(title, parent=None, dbc: Optional[cantools.database.can.database.Database] = None, strings=1, modules=8, cells_per_module=12, pos=None)

Frame to display the cell voltages in a table.

Destroy()

Unbind normal destroy

NewDestroy()

Destroys the frame

update_cell_voltages(value: can.message.Message)

Updates the table cell entries with the current voltage values