31 #include "../INC/userOutputTask.h"
40 uint32_t termMsgCounter = 2;
41 bool oldMotorRunning =
false;
44 OSTimeDlyHMSM(0, 0, 2, 0);
48 OS_FLAG_WAIT_SET_ANY + OS_FLAG_CONSUME, 0, &err);
49 if (OS_NO_ERR == err){
53 if (OS_NO_ERR == err) {
60 && !oldMotorRunning) {
61 oldMotorRunning =
true;
71 oldMotorRunning =
false;
86 printf_lcd(
"M:%i%i%i%i", (modeBits & 0x8) >> 3, (modeBits & 0x4) >> 2,
87 (modeBits & 0x2) >> 1, (modeBits & 0x1));
131 switch (outputTaskDataLocal.
speedReg) {
166 error(
"OUTPUT_TASK_GLOB_VAR_ERR: %i\n", err);
169 error(
"OUTPUT_TASK_FLAG_ERR: %i\n", err);
176 uint32_t *termMsgCounterPtr) {
178 printf_term(
"Message Nr. #%i\n", *termMsgCounterPtr);
190 printf_term(
"M:%i%i%i%i ", (modeBits & 0x8) >> 3, (modeBits & 0x4) >> 2,
191 (modeBits & 0x2) >> 1, (modeBits & 0x1));
221 (*termMsgCounterPtr)++;
#define CTRL_REG_LR_MSK
Left (0) or Right (1)-Bit.
void printf_term(const char *,...)
Writes formated string to terminal.
#define HEX_FIVE
number 5 on HEX-segments
#define HEX_FOUR
number 4 on HEX-segments
#define HEX_LINE
middle line on HEX-segments
#define CTRL_REG_IE_MSK
Interrupt-Enable Bit.
void fflush_lcd()
Writes buffed data to lcd.
static __inline__ void PIO_HEX1_Set(uint32_t segmentValues)
Function to set segments on hex1 display.
#define error(...)
Prints the Error-messages in the terminal.
#define CTRL_REG_MODE_MSK
Mode-combination according to ctrlRegSet()-function.
#define HEX_SEVEN
number 7 on HEX-segments
uint8_t ctrlReg
copy control register
void UserOutputTask(void *pdata)
UserOutputTask.
#define HEX_THREE
number 3 on HEX-segments
Motor turning one rotation.
static __inline__ void PIO_HEX2_Set(uint32_t segmentValues)
Function to set segments on hex2 display.
#define MOTOR_STOP_EVENT
the interrupt is sent via VHDL-Component, when the motor reached its end-position ...
state_t operationalStatus
operational status
void printTerminalInfo(outputTaskData_t *outputTaskDataPtr, uint32_t *termMsgCounterPtr)
Prints Motor information on the terminal.
void clear_lcd(void)
Clears display.
#define HEX_SIX
number 6 on HEX-segments
uint8_t speedReg
copy of speed register
#define CTRL_REG_IR_MSK
Interrupt-Request Bit.
systemState_t systemState
stores state of system
Motor turning 1/2 rotation.
#define HEX_EIGHT
number 8 on HEX-segments
uint8_t outputTaskDataRx(outputTaskData_t *data)
Received data from ipc channel.
Motor is continously running.
Motor turning 1/4 rotation.
#define HEX_NINE
number 9 on HEX-segments
#define HEX_ZERO
number 0 on HEX-segments
#define HEX_RIGHT
r for right on HEX-segments
OS_FLAG_GRP * userOutputTaskFlagsGrp
The flags group used in the user-output-task.
#define CTRL_REG_RS_MSK
Run (1) or Stop (0)-Bit.
#define GLOB_VAR_UPDATE
signals that data changed
void printf_lcd(const char *,...)
Writes formated string to lcd.
#define HEX_ONE
number 1 on HEX-segments
#define VERSION
global version definition
void setPos_lcd(int32_t row, int32_t col)
Sets the cursor position on display.
uint32_t stepsReg
copy of steps register
void fflush_term()
Writes buffed data to terminal.
#define HEX_TWO
number 2 on HEX-segments
#define HEX_LEFT
L for left on HEX-segments
Motor turning two rotation.
useCases_t activeUseCase
active use case
static __inline__ void PIO_HEX0_Set(uint32_t segmentValues)
Function to set segments on hex0 display.
Datatype of global variable for transmitting information from InputTask to OutputTask.