Defines | Enumerations | Functions

uoled.h File Reference

Library for communication with uOLED display using serial interface,. More...

#include <sercom.h>
Include dependency graph for uoled.h:
This graph shows which files directly or indirectly include this file:

Defines

#define ID_DISPLAY_STATUS   0x81
#define ID_DISPLAY_VOLTAGE   0x82
#define ID_DISPLAY_FSM   0x83
#define ID_DISPLAY_POSITION   0x86
#define ID_DISPLAY_ALIVE   0x87
#define ID_DISPLAY_CORNS   0x88
#define ID_DISPLAY_COLOR   0x89
#define MGS_LENGTH_DISPLAY_STATUS   2
#define MGS_LENGTH_DISPLAY_SM   21
#define MGS_LENGTH_DISPLAY_VOLTAGE   18
#define MGS_LENGTH_DISPLAY_POSITION   10
#define MGS_LENGTH_DISPLAY_ALIVE   1
#define MGS_LENGTH_DISPLAY_CORNS   3
#define MGS_LENGTH_DISPLAY_COLOR   2
#define TRESHOLDS_VOLTAGE33   3.2
#define TRESHOLDS_VOLTAGE50   4.9
#define TRESHOLDS_VOLTAGE80   7.9
#define TRESHOLDS_VOLTAGEBAT   12.5
#define WARNING_VOLTAGEBAT   13.0
#define COMPONENTS_MASK   31
#define STATUS_MASK   96
#define STATUS_SHIFT   5

Enumerations

enum  UDE_component_t {
  UKN = 0, MOT = 1, ODO = 2, JAW = 3,
  PWR = 4, HOK = 5, APP = 6, LFT = 7,
  STA = 8, TIM = 9, UKN = 0, MOT = 1,
  ODO = 2, CAM = 3, PWR = 4, HOK = 5,
  APP = 6, VID = 7, STA = 8
}
 

0.

More...
enum  UDE_hw_status_t {
  STATUS_FAILED = 0, STATUS_OK = 1, STATUS_WARNING = 2, STATUS_FAILED = 0,
  STATUS_OK = 1, STATUS_WARNING = 2
}
 

00 = HW_STATUS_FAILED 01 = HW_STATUS_OK 10 = HW_STATUS_WARNING

More...
enum  UDE_fsm_t {
  FSM_MAIN = 0, FSM_MOVE = 1, FSM_ACT = 2, FSM_MAIN = 0,
  FSM_MOVE = 1, FSM_ACT = 2
}
 

ID_DISPLAY_FSM + ...

More...
enum  UDE_recieve_cmd_t {
  RCMD_NULL = 0x00, RCMD_FORK_DOWN = 0x81, RCMD_FORK_UP = 0x82, RCMD_DOOR_OPEN = 0x83,
  RCMD_DOOR_CLOSE = 0x84, RCMD_CYLINDER_ON = 0x85, RCMD_CYLINDER_OFF = 0x86, RCMD_STATUS_ALL = 0x87
}
 

0x81 = Vidle dolu 0x82 = Vidle nahoru 0x83 = Dvere otevrit 0x84 = Dvere zavrit 0x85 = Valec zapnout 0x86 = Valec vypnout 0x87 = Posli cely status

More...

Functions

struct sercom_datauoled_sercom_init (char *tty, void(*sighandler)(int))
 Initializes and opens serial port (sercom).
void uoled_sercom_close ()
 Close serial port (sercom).
int uoled_read_cmd (uint8_t *buff, int size)
 Read data from serial port (sercom).
int uoled_recieve_cmd (UDE_recieve_cmd_t *cmd)
 Read command from serial port.
int uoled_display_status (UDE_component_t c, UDE_hw_status_t s)
 Send the actual state of components to display.
int uoled_display_fsm (UDE_fsm_t fsm, char *state)
 Send the actual state of FSM to display.
int uoled_display_alive ()
 Used to refresh display indication that comunication is ok.
int uoled_display_voltage (double voltage33, double voltage50, double voltage80, double voltageBAT)
 Used to refresh voltage readings on the display.
int uoled_display_position (double x, double y, double phi)
 Used to refresh actual position on the display.
int uoled_display_color (int color)
int uoled_display_corns (int side, int center)

Detailed Description

Library for communication with uOLED display using serial interface,.

Author:
(Martin Zidek) Mojmir Kittler

Define Documentation

#define COMPONENTS_MASK   31
#define ID_DISPLAY_ALIVE   0x87
#define ID_DISPLAY_COLOR   0x89
#define ID_DISPLAY_CORNS   0x88
#define ID_DISPLAY_FSM   0x83
#define ID_DISPLAY_POSITION   0x86
#define ID_DISPLAY_STATUS   0x81
#define ID_DISPLAY_VOLTAGE   0x82
#define MGS_LENGTH_DISPLAY_ALIVE   1
#define MGS_LENGTH_DISPLAY_COLOR   2
#define MGS_LENGTH_DISPLAY_CORNS   3
#define MGS_LENGTH_DISPLAY_POSITION   10
#define MGS_LENGTH_DISPLAY_SM   21
#define MGS_LENGTH_DISPLAY_STATUS   2
#define MGS_LENGTH_DISPLAY_VOLTAGE   18
#define STATUS_MASK   96
#define STATUS_SHIFT   5
#define TRESHOLDS_VOLTAGE33   3.2
#define TRESHOLDS_VOLTAGE50   4.9
#define TRESHOLDS_VOLTAGE80   7.9
#define TRESHOLDS_VOLTAGEBAT   12.5
#define WARNING_VOLTAGEBAT   13.0

Enumeration Type Documentation

0.

(neni pouzito) 1. MOT - ridici jednotka motoru 2. ODO - odometrie 3. CAM - kamera 4. PWR - napajeci zdroje 5. HOK - Hokuyo 6. APP - ridici aplikace 7. VID - ovladani vidli a dvirek na vysypavani 8. STA - startovaci tlacitko

Enumerator:
UKN 
MOT 
ODO 
JAW 
PWR 
HOK 
APP 
LFT 
STA 
TIM 
UKN 
MOT 
ODO 
CAM 
PWR 
HOK 
APP 
VID 
STA 
enum UDE_fsm_t

ID_DISPLAY_FSM + ...

0 = MAIN FSM STATE 1 = MOVE FSM STATE 2 = ACT FSM STATE

Enumerator:
FSM_MAIN 
FSM_MOVE 
FSM_ACT 
FSM_MAIN 
FSM_MOVE 
FSM_ACT 

00 = HW_STATUS_FAILED 01 = HW_STATUS_OK 10 = HW_STATUS_WARNING

Enumerator:
STATUS_FAILED 
STATUS_OK 
STATUS_WARNING 
STATUS_FAILED 
STATUS_OK 
STATUS_WARNING 

0x81 = Vidle dolu 0x82 = Vidle nahoru 0x83 = Dvere otevrit 0x84 = Dvere zavrit 0x85 = Valec zapnout 0x86 = Valec vypnout 0x87 = Posli cely status

Enumerator:
RCMD_NULL 
RCMD_FORK_DOWN 
RCMD_FORK_UP 
RCMD_DOOR_OPEN 
RCMD_DOOR_CLOSE 
RCMD_CYLINDER_ON 
RCMD_CYLINDER_OFF 
RCMD_STATUS_ALL 

Function Documentation

int uoled_display_color ( int  color  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

int uoled_display_corns ( int  side,
int  center 
)

Here is the call graph for this function:

Here is the caller graph for this function: