# Cube GUI

![Cube GUI](https://github.com/emlab-fi/cube_software/blob/04411912016403960db4ff590925b485b4575fd6/screenshot.png)

Cube GUI is a simple, DearPyGUI, multiplatform application for controlling the cube.

Current features include:
 - Setting up serial ports for communication
 - Exposing a cmd-like interface for manual control
 - Controling movement
 - Ability to add custom sensor communication functions
 - Automated grid measurement with export to .CSV file

## GUI Sections
Each section can be collapsed and move around as a separate sub-window in top level GUI window.
The `Automated measuring` section is collapsed by default.

### Connection
Facilitates the connection via serial link to the hardware.

__Serial ports:__ Lists all current serial ports detected  
__Refresh:__ Refreshes the list of the ports  
__Connect:__ Opens connection via the selected serial port  
__Disconnect:__ Terminates the connection  


### Status
Provides various status info, such as general status, current position, current coordinate mode etc.

### Control
Has interface for movement control.

__X, Y, Z:__ Set the desired XYZ position  
__Go to position:__ Go to the set position  
__Measure:__ if the measure function is provided, runs it  
__Home:__ Start the homing procedure  

### Console
Provides a console-like control interface for the Cube.
Result of all the operations are written here.
You can type your own commands manually in the bottom text field.

#### Available commands
Type `help` to list available commands.

TODO: add list of commands and their arguments

### Automated measuring

## Supplying custom sensor functions to the GUI


## CSV export format