brazos-trapezoidal
Macros | Functions | Variables
API023MotorControl.c File Reference

Basic description of file contents. More...

#include "API023MotorControl.h"
#include "string.h"
#include "IntegrationCalibration.h"
Include dependency graph for API023MotorControl.c:

Go to the source code of this file.

Macros

#define CHARTOLONG(x, y)   (int16_t)((x << 8) + y)
 
#define BYTES_PER_DATA   5
 

Functions

void sendlogdata (unsigned char motindex)
 method to load and send data More...
 
void get_measurements (unsigned char mindex)
 method to sort the data to be sent More...
 
void select_algotorun (uint8_t mindex, API023_ALGO_TYPE algo, uint8_t value)
 method to sort the algorithm to run or stop More...
 
void API023MotorControl__Initialize (void)
 It Initializes the module API023MotorControl and its variables. More...
 
void API023MotorControl__ReceiveParser (TSP_TYPE *message)
 Method to handle the received messages for this API. More...
 
void API023MotorControl__Handler (void)
 API0023 Handler. More...
 
void API023MotorControl__CmdAccepted (uint8_t accepted, API023_MOTORCONTROL_TYPE cmd_id)
 Sends the command feedback. More...
 

Variables

API023_DATALOG_TYPE DataLogConfig [NUMBER_OF_MOTORS]
 

Detailed Description

Basic description of file contents.

Detailed description of the file contents

Version
Sep 23, 2020

Definition in file API023MotorControl.c.

Macro Definition Documentation

◆ BYTES_PER_DATA

#define BYTES_PER_DATA   5

Definition at line 20 of file API023MotorControl.c.

◆ CHARTOLONG

#define CHARTOLONG (   x,
  y 
)    (int16_t)((x << 8) + y)

---------------------------------— Theta Power Systems - CONFIDENTIAL ----------------------------------------—

Definition at line 19 of file API023MotorControl.c.

Function Documentation

◆ API023MotorControl__CmdAccepted()

void API023MotorControl__CmdAccepted ( uint8_t  accepted,
API023_MOTORCONTROL_TYPE  cmd_id 
)

Sends the command feedback.

Parameters
uint8_taccepted: if the received cmd was valid or not
API023_MOTORCONTROL_TYPEcmd_id: command ID for reference

Definition at line 210 of file API023MotorControl.c.

◆ API023MotorControl__Handler()

void API023MotorControl__Handler ( void  )

API0023 Handler.

Should be called at 1ms rate

Definition at line 186 of file API023MotorControl.c.

◆ API023MotorControl__Initialize()

void API023MotorControl__Initialize ( void  )

It Initializes the module API023MotorControl and its variables.

Definition at line 41 of file API023MotorControl.c.

◆ API023MotorControl__ReceiveParser()

void API023MotorControl__ReceiveParser ( TSP_TYPE *  message)

Method to handle the received messages for this API.

Parameters
TSP_TYPE* message

Definition at line 59 of file API023MotorControl.c.

◆ get_measurements()

void get_measurements ( unsigned char  mindex)

method to sort the data to be sent

Definition at line 248 of file API023MotorControl.c.

◆ select_algotorun()

void select_algotorun ( uint8_t  mindex,
API023_ALGO_TYPE  algo,
uint8_t  value 
)

method to sort the algorithm to run or stop

Parameters
uint8_tmindex: motor index
API023_ALGO_TYPEalgo: Selected algorithm
uint8_tvalue: 1/0 - Start/stop algorithm

Definition at line 334 of file API023MotorControl.c.

◆ sendlogdata()

void sendlogdata ( unsigned char  motindex)

method to load and send data

Definition at line 232 of file API023MotorControl.c.

Variable Documentation

◆ DataLogConfig

Definition at line 24 of file API023MotorControl.c.