Merge branch 'develop'

This commit is contained in:
Rémi Heredero 2023-09-01 17:24:59 +02:00
commit 242cf4d0da
55 changed files with 20479 additions and 812 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.idea

View File

@ -7,7 +7,6 @@ debug/
dist/
disassembly/
nbproject/private/
nbproject/*.mk
nbproject/*.bash
nbproject/Makefile-genesis.properties

View File

@ -5,9 +5,11 @@
* @file can_message.c
*/
#include "../middleware/can_interface.h"
#include "can_message.h"
#include "car.h"
#include "../app/factory/factory.h"
#include "../middleware/can_interface.h"
#include "kartculator.h"
typedef union {
struct {
@ -16,84 +18,363 @@ typedef union {
uint8_t byte2;
uint8_t byte3;
} separate;
struct {
uint32_t bytes;
} full;
uint32_t full;
} BYTES_4;
typedef union {
struct {
uint8_t byte0;
uint8_t byte1;
} separate;
uint16_t full;
} BYTES_2;
void CM_processIncome(uint8_t idSender, uint8_t idMsg, uint32_t data){
BYTES_4 incomeData;
incomeData.full = data;
BYTES_4 revertData;
revertData.separate.byte0 = incomeData.separate.byte3;
revertData.separate.byte1 = incomeData.separate.byte2;
revertData.separate.byte2 = incomeData.separate.byte1;
revertData.separate.byte3 = incomeData.separate.byte0;
switch(idSender){
case 0: // Broadcast / Debug
/*********************
* BROADCAST / DEBUG *
*********************/
case 0:
if(idMsg == 0x0) { // CONTROL_SETUP
// steeringMode eraseMemory - controlAliveTime
if (incomeData.separate.byte1) {
MEM_reset();
}
KART_CST.CONTROL_STEERING_MODE = incomeData.separate.byte0;
KART_CST.CONTROL_ALIVE_TIME = incomeData.separate.byte3;
MEM_write_1_byte(MEMADD_CONTROL_STEERING_MODE, KART_CST.CONTROL_STEERING_MODE);
MEM_write_1_byte(MEMADD_CONTROL_ALIVE_TIME, KART_CST.CONTROL_ALIVE_TIME);
ALIVE_setAliveTime(ALcontroller(), KART_CST.CONTROL_ALIVE_TIME);
ALIVE_emitStart(ALcontroller(), 0, 0);
}
if(idMsg == 0x1) { // CONTROL_SPEED_FACTOR
// valHH valH valL valLL
KART_CST.CONTROL_SPEED_FACTOR = data;
MEM_write_4_byte(MEMADD_CONTROL_SPEED_FACTOR, KART_CST.CONTROL_SPEED_FACTOR);
}
if(idMsg == 0x2) { // CONTROL_POWER_FACTOR
// valHH valH valL valLL
KART_CST.CONTROL_POWER_FACTOR = data;
MEM_write_4_byte(MEMADD_CONTROL_POWER_FACTOR, KART_CST.CONTROL_POWER_FACTOR);
}
if(idMsg == 0x3) { // CONTROL_STEERING_FACTOR
// valHH valH valL valLL
KART_CST.CONTROL_STEERING_FACTOR = data;
MEM_write_4_byte(MEMADD_CONTROL_STEERING_FACTOR, KART_CST.CONTROL_STEERING_FACTOR);
}
if(idMsg == 0x4) { // CONTROL_SECURITY_PARAM
// maxSpeedFw maxSpeedBw - -
KART_CST.CONTROL_MAX_SPEED_FW = incomeData.separate.byte0;
KART_CST.CONTROL_MAX_SPEED_BW = incomeData.separate.byte1;
MEM_write_1_byte(MEMADD_CONTROL_MAX_SPEED_FW, KART_CST.CONTROL_MAX_SPEED_FW);
MEM_write_1_byte(MEMADD_CONTROL_MAX_SPEED_BW, KART_CST.CONTROL_MAX_SPEED_BW);
}
if(idMsg == 0x5) { // CONTROL_SETUP_PARAM
// displayAliveTime steeringAliveTime - -
KART_CST.DISPLAY_ALIVE_TIME = incomeData.separate.byte0;
KART_CST.STEERING_ALIVE_TIME = incomeData.separate.byte1;
MEM_write_1_byte(MEMADD_DISPLAY_ALIVE_TIME, KART_CST.DISPLAY_ALIVE_TIME);
MEM_write_1_byte(MEMADD_STEERING_ALIVE_TIME, KART_CST.STEERING_ALIVE_TIME);
// TODO set alive times
// start alives
CM_DISPLAY_SETUP(NULL);
CM_STEERING_SETUP(NULL);
}
if(idMsg == 0x6) { // CONTROL_SETUP_PARAM_JOY
// joystickMode joystickParam1 joystickParam2 joystickAliveTime
KART_CST.JOYSTICK_MODE = incomeData.separate.byte0;
KART_CST.JOYSTICK_PARAM1 = incomeData.separate.byte1;
KART_CST.JOYSTICK_PARAM2 = incomeData.separate.byte2;
KART_CST.JOYSTICK_ALIVE_TIME = incomeData.separate.byte3;
MEM_write_1_byte(MEMADD_JOYSTICK_MODE, KART_CST.JOYSTICK_MODE);
MEM_write_1_byte(MEMADD_JOYSTICK_PARAM1, KART_CST.JOYSTICK_PARAM1);
MEM_write_1_byte(MEMADD_JOYSTICK_PARAM2, KART_CST.JOYSTICK_PARAM2);
MEM_write_1_byte(MEMADD_JOYSTICK_ALIVE_TIME, KART_CST.JOYSTICK_ALIVE_TIME);
ALIVE_setAliveTime(ALjoy(), KART_CST.JOYSTICK_ALIVE_TIME);
ALIVE_emitStart(ALjoy(), 0, 0);
CM_JOY_SETUP(NULL);
}
if(idMsg == 0x7) { // CONTROL_SETUP_PARAM_DRIVE
// driveAliveTime driveSpeedTime driveStopTime -
KART_CST.DRIVE_ALIVE_TIME = incomeData.separate.byte0;
KART_CST.DRIVE_SPEED_TIME = incomeData.separate.byte1;
KART_CST.DRIVE_STOP_TIME = incomeData.separate.byte2;
MEM_write_1_byte(MEMADD_DRIVE_ALIVE_TIME, KART_CST.DRIVE_ALIVE_TIME);
MEM_write_1_byte(MEMADD_DRIVE_SPEED_TIME, KART_CST.DRIVE_SPEED_TIME);
MEM_write_1_byte(MEMADD_DRIVE_STOP_TIME, KART_CST.DRIVE_STOP_TIME);
ALIVE_setAliveTime(&drive()->myChecker, KART_CST.DRIVE_ALIVE_TIME);
ALIVE_emitStart(&drive()->myChecker, 0, 0);
CM_DRIVE_SETUP(NULL);
}
if(idMsg == 0x8) { // CONTROL_SETUP_PARAM_BATTERY
// batteryVoltTime batteryCurrentTime batteryEnergyTime batteryAliveTime
KART_CST.BATTERY_VOLT_TIME = incomeData.separate.byte0;
KART_CST.BATTERY_CURRENT_TIME = incomeData.separate.byte1;
KART_CST.BATTERY_ENERGY_TIME = incomeData.separate.byte2;
KART_CST.BATTERY_ALIVE_TIME = incomeData.separate.byte3;
MEM_write_1_byte(MEMADD_BATTERY_VOLT_TIME, KART_CST.BATTERY_VOLT_TIME);
MEM_write_1_byte(MEMADD_BATTERY_CURRENT_TIME, KART_CST.BATTERY_CURRENT_TIME);
MEM_write_1_byte(MEMADD_BATTERY_ENERGY_TIME, KART_CST.BATTERY_ENERGY_TIME);
MEM_write_1_byte(MEMADD_BATTERY_ALIVE_TIME, KART_CST.BATTERY_ALIVE_TIME);
// TODO set alive time
// TODO start alive
CM_SUPPLY_SETUP(NULL);
}
break;
case 2: // Joystick
/************
* JOYSTICK *
************/
case 2:
if(idMsg == 0x1) { // JOY_MESURE
// posX posY button -
calcTorque(incomeData.separate.byte1);
calcPosition(incomeData.separate.byte0);
}
if(idMsg == 0xF) { // JOY_ALIVE
ALIVE_CHECKER_ISALIVE(ACjoy());
// - - - -
ALIVE_ISALIVE(ALjoy());
if(ALjoy()->state == STAL_DEAD){
KART_CST.JOYSTICK_MODE = MEM_read_1_byte(MEMADD_JOYSTICK_MODE);
KART_CST.JOYSTICK_PARAM1 = MEM_read_1_byte(MEMADD_JOYSTICK_PARAM1);
KART_CST.JOYSTICK_PARAM2 = MEM_read_1_byte(MEMADD_JOYSTICK_PARAM2);
KART_CST.JOYSTICK_ALIVE_TIME = MEM_read_1_byte(MEMADD_JOYSTICK_ALIVE_TIME);
ALIVE_setAliveTime(ALjoy(), KART_CST.JOYSTICK_ALIVE_TIME);
ALIVE_emitResurrect(ALjoy(), 0, 0);
ALIVE_emitBorn(ALjoy(), 0, 0);
ALIVE_emitReady(ALjoy(), 0, 0);
}
}
break;
case 3: // Display
/***********
* DISPLAY *
***********/
case 3:
if(idMsg == 0xF) { // DISPLAY_ALIVE
// powerMode - - -
// TODO display say ALIVE
}
break;
case 4: // Drive
/*********
* DRIVE *
*********/
case 4:
if(idMsg == 0x0) { // DRIVE_SPEED
// speedHH speedH speedL speedLL
calcSpeed(revertData.full);
DRIVE_emitPollSpeed(drive());
}
if(idMsg == 0xF) { // DRIVE_ALIVE
// statusH statusL - -
ALIVE_ISALIVE(&drive()->myChecker);
if(drive()->myChecker.state == STAL_DEAD){
KART_CST.DRIVE_SPEED_TIME = MEM_read_1_byte(MEMADD_DRIVE_SPEED_TIME);
KART_CST.DRIVE_STOP_TIME = MEM_read_1_byte(MEMADD_DRIVE_STOP_TIME);
KART_CST.DRIVE_ALIVE_TIME = MEM_read_1_byte(MEMADD_DRIVE_ALIVE_TIME);
ALIVE_emitResurrect(&drive()->myChecker, 0, 0);
ALIVE_emitBorn(&drive()->myChecker, 0, 0);
}
}
break;
case 5: // Steering
/************
* STEERING *
************/
case 5:
if(idMsg == 0x1) { // STEERING_GET_CENTER
// valHH valH valL valLL
eKart.center = revertData.full;
}
if(idMsg == 0x2) { // STEERING_GET_POSITION
// valHH valH valL valLL
}
if(idMsg == 0xF) { // STEERING_ALIVE
// statusH statusL - -
// TODO steering say ALIVE with his status
}
break;
case 6: // Supply
/**********
* SUPPLY *
**********/
case 6:
if(idMsg == 0xF) { // BATTERY_ALIVE
// - - - -
// TODO battery say ALIVE
}
break;
case 7: // Undefined
/*************
* UNDEFINED *
*************/
case 7:
break;
}
}
void CM_CONTROLLER_ALIVE(void* p) {
// - - - -
CAN_Send(0x0, 0xF, 0);
}
void CM_JOY_SETUP(void* p) {
// mode parm1 param2 aliveTime
BYTES_4 joy;
joy.separate.byte0 = CAR_CST.JOYSTICK_MODE;
joy.separate.byte1 = CAR_CST.JOYSTICK_PARAM1;
joy.separate.byte2 = CAR_CST.JOYSTICK_PARAM2;
joy.separate.byte3 = CAR_CST.JOYSTICK_ALIVE_TIME;
CAN_Send(2, 0, joy.full.bytes);
joy.separate.byte0 = KART_CST.JOYSTICK_MODE;
joy.separate.byte1 = KART_CST.JOYSTICK_PARAM1;
joy.separate.byte2 = KART_CST.JOYSTICK_PARAM2;
joy.separate.byte3 = KART_CST.JOYSTICK_ALIVE_TIME;
CAN_Send(2, 0, joy.full);
}
void CM_DISPLAY_SETUP(void* p) {
// reset - - aliveTime
BYTES_4 display;
display.separate.byte0 = 0; // reset
display.separate.byte3 = KART_CST.DISPLAY_ALIVE_TIME;
CAN_Send(3, 0, display.full);
}
void CM_DISPLAY_SPEED(void* p) {
// valH valL - -
BYTES_4 tmpData;
// byte0 should be valH but isn't possible to go enough fast for use it
tmpData.separate.byte0 = 0;
tmpData.separate.byte1 = *((uint8_t*) p);
tmpData.separate.byte2 = 0;
tmpData.separate.byte3 = 0;
CAN_Send(3, 2, tmpData.full);
}
void CM_DISPLAY_DIRECTION(void* p) {
// direction - - -
BYTES_4 tmpData;
tmpData.separate.byte0 = (uint8_t) p;
tmpData.separate.byte1 = 0;
tmpData.separate.byte2 = 0;
tmpData.separate.byte3 = 0;
CAN_Send(3, 3, tmpData.full);
}
void CM_DRIVE_SETUP(void* p) {
// reset/init speedTime stopTime aliveTime
BYTES_4 tmpData;
tmpData.separate.byte0 = (uint8_t) p;
tmpData.separate.byte1 = KART_CST.DRIVE_SPEED_TIME;
tmpData.separate.byte2 = KART_CST.DRIVE_STOP_TIME;
tmpData.separate.byte3 = KART_CST.DRIVE_ALIVE_TIME;
CAN_Send(4, 0, tmpData.full);
}
void CM_DRIVE_POWER(void* p) {
// valH valL - -
BYTES_2 torque;
BYTES_4 tmpData;
torque.full = *((int16_t*) p);
tmpData.separate.byte0 = torque.separate.byte1;
tmpData.separate.byte1 = torque.separate.byte0;
tmpData.separate.byte2 = 0;
tmpData.separate.byte3 = 0;
CAN_Send(4, 1, tmpData.full);
}
void CM_STEERING_SETUP(void* p) {
// reset/init homing setCenter aliveTime
// TODO not working have to fix it
BYTES_4 tmpData;
uint8_t choice = (uint8_t) p;
switch (choice) {
case 1:
tmpData.separate.byte0 = 1;
tmpData.separate.byte1 = 0;
tmpData.separate.byte2 = 0;
break;
case 2:
tmpData.separate.byte0 = 0;
tmpData.separate.byte1 = 1;
tmpData.separate.byte2 = 0;
break;
case 3:
tmpData.separate.byte0 = 0;
tmpData.separate.byte1 = 0;
tmpData.separate.byte2 = 1;
break;
default:
tmpData.separate.byte0 = 0;
tmpData.separate.byte1 = 0;
tmpData.separate.byte2 = 0;
break;
}
tmpData.separate.byte3 = KART_CST.STEERING_ALIVE_TIME; // 0 -> no alive
CAN_Send(5, 0, tmpData.full);
}
void CM_STEERING_SET(void* p) {
// valHH valH valL valLL
BYTES_4 pPosition;
pPosition.full = *((uint32_t*) p);
BYTES_4 sPosition;
sPosition.separate.byte0 = pPosition.separate.byte3;
sPosition.separate.byte1 = pPosition.separate.byte2;
sPosition.separate.byte2 = pPosition.separate.byte1;
sPosition.separate.byte3 = pPosition.separate.byte0;
CAN_Send(5, 1, sPosition.full);
}
void CM_SETUP_CONTROL(void* p) {
void CM_SUPPLY_SETUP(void* p) {
// batteryVoltTime batteryCurrentTime batteryEnergyTime aliveTime
BYTES_4 supply;
supply.separate.byte0 = KART_CST.BATTERY_VOLT_TIME;
supply.separate.byte1 = KART_CST.BATTERY_CURRENT_TIME;
supply.separate.byte2 = KART_CST.BATTERY_ENERGY_TIME;
supply.separate.byte3 = KART_CST.BATTERY_ALIVE_TIME;
CAN_Send(6, 0, supply.full);
}

View File

@ -8,6 +8,9 @@
#ifndef CAN_MESSAGE_H
#define CAN_MESSAGE_H
#include <stdint.h> // usage of standard types
#include <stdbool.h> // usage of boolean types
#include "../mcc_generated_files/mcc.h"
/*
S R M
@ -23,17 +26,80 @@ S R M
1 6 0 SETUP_CONTROL batteryVoltTime batteryCurrentTime batteryEnergyTime aliveTime
*/
/**
* Process an incoming message
* @param idSender id of the sender
* @param idMsg is of the message
* @param data data of the message
*/
void CM_processIncome(uint8_t idSender, uint8_t idMsg, uint32_t data);
/**
* Send alive message from controller
* @param p have to be NULL
*/
void CM_CONTROLLER_ALIVE(void* p);
/**
* Send setup to the joystick (settings from memory)
* @param p have to be NULL
*/
void CM_JOY_SETUP(void* p);
/**
* Send setup to the display (settings from memory)
* @param p have to be NULL
*/
void CM_DISPLAY_SETUP(void* p);
/**
* Send speed to display
* @param p the speed in 100m/h (max 255 m/h)
*/
void CM_DISPLAY_SPEED(void* p);
/**
* Send direction of the steering wheel
* 0 is straight forward
* positive value is going right
* negative value is going left
* @param p the direction (int 8)
*/
void CM_DISPLAY_DIRECTION(void* p);
/**
* Send setup to the drive
* use with reset in parameter
* other settings from memory
* @param p 1 if reset/init 0 else
*/
void CM_DRIVE_SETUP(void* p);
/**
* Send power to the drive
* @param p the torque (int16_t*)
*/
void CM_DRIVE_POWER(void* p);
/**
* Send setup to the steering
* can be use for reset (1), homing (2) and setCenter (3)
* @param p 0 for setup, 1 for reset, 2 for homing, 3 for setCenter
*/
void CM_STEERING_SETUP(void* p);
/**
* Send position for steering
* no negative value because 0 is home (sensor)
* @param p the position (uint32_t*)
*/
void CM_STEERING_SET(void* p);
void CM_SETUP_CONTROL(void* p);
/**
* Send setup to the supply (settings from memory)
* @param p have to be NULL
*/
void CM_SUPPLY_SETUP(void* p);
#endif /* CAN_MESSAGE_H */

View File

@ -34,12 +34,15 @@
#define MEMADD_JOYSTICK_PARAM1 0x12
#define MEMADD_JOYSTICK_PARAM2 0x13
#define MEMADD_JOYSTICK_ALIVE_TIME 0x14
#define MEMADD_DISPLAY_ALIVE_TIME 0x
#define MEMADD_DRIVE_SPEED_TIME 0x
#define MEMADD_DRIVE_STOP_TIME 0x
#define MEMADD_DRIVE_ALIVE_TIME 0x
#define MEMADD_STEERING_ALIVE_TIME 0x
#define MEMADD_BATTERY_ALIVE_TIME 0x
#define MEMADD_DISPLAY_ALIVE_TIME 0x15
#define MEMADD_DRIVE_SPEED_TIME 0x16
#define MEMADD_DRIVE_STOP_TIME 0x17
#define MEMADD_DRIVE_ALIVE_TIME 0x18
#define MEMADD_STEERING_ALIVE_TIME 0x19
#define MEMADD_BATTERY_VOLT_TIME 0x1A
#define MEMADD_BATTERY_CURRENT_TIME 0x1B
#define MEMADD_BATTERY_ENERGY_TIME 0x1C
#define MEMADD_BATTERY_ALIVE_TIME 0x1D
typedef struct {
uint8_t CONTROL_STEERING_MODE;
@ -49,7 +52,6 @@ typedef struct {
uint32_t CONTROL_STEERING_FACTOR;
uint8_t CONTROL_MAX_SPEED_FW;
uint8_t CONTROL_MAX_SPEED_BW;
uint8_t JOYSTICK_MODE;
uint8_t JOYSTICK_PARAM1;
uint8_t JOYSTICK_PARAM2;
@ -59,9 +61,20 @@ typedef struct {
uint8_t DRIVE_STOP_TIME;
uint8_t DRIVE_ALIVE_TIME;
uint8_t STEERING_ALIVE_TIME;
uint8_t BATTERY_VOLT_TIME;
uint8_t BATTERY_CURRENT_TIME;
uint8_t BATTERY_ENERGY_TIME;
uint8_t BATTERY_ALIVE_TIME;
} CAR_CST_TYPE;
CAR_CST_TYPE CAR_CST;
} KART_CST_TYPE;
KART_CST_TYPE KART_CST;
typedef struct {
int16_t torque; //
uint32_t center; //
uint32_t position; //
uint8_t speed; // 100m/h
} KART_VAR_TYPE;
KART_VAR_TYPE eKart;
#endif /* CAR_H */

View File

@ -0,0 +1,171 @@
/**
* @author Rémi Heredero
* @version 1.0.0
* @date August 2023
* @file drive.c
*/
#include "drive.h"
#include "car.h"
#include "can_message.h"
void DRIVE_init(DRIVE* me){
me->state = STDR_INIT;
ALIVE_init(&me->myChecker);
ALIVE_onSetup(&me->myChecker, CM_DRIVE_SETUP, NULL);
ALIVE_onWait(&me->myChecker, DRIVE_emitStart, me);
ALIVE_onDead(&me->myChecker, DRIVE_emitStop, me);
ALIVE_onBorn(&me->myChecker, DRIVE_emitResurrect, me);
me->wait.f = NULL;
me->run.f = NULL;
me->dead.f = NULL;
}
void DRIVE_startBehaviour(DRIVE* me){
POST(me, &DRIVE_processEvent, evDRinit, 0, 0);
}
bool DRIVE_processEvent(Event* ev) {
bool processed = false;
DRIVE* me = (DRIVE*)Event_getTarget(ev);
DRIVE_STATES oldState = me->state;
evIDT evid = Event_getId(ev);
uint64_t data = Event_getData(ev);
switch (me->state) { // onState
case STDR_INIT:
if (ev->id == evDRinit) {
me->state = STDR_WAIT;
ALIVE_startBehaviourChecker(&me->myChecker); // Start alive checker
}
break;
case STDR_WAIT:
if (ev->id == evDRstart) {
me->state = STDR_RUN;
}
ALIVE_setAliveTime(&me->myChecker, KART_CST.DRIVE_ALIVE_TIME);
ALIVE_emitBorn(&me->myChecker, 100, 0); // Born after 100 ms
ALIVE_emitReady(&me->myChecker, 200, 0); // Ready after 200 ms
break;
case STDR_RUN:
if (ev->id == evDRstop) {
me->state = STDR_DEAD;
}
if (ev->id == evDRpollTorque) {
CM_DRIVE_POWER(&eKart.torque);
}
if (ev->id == evDRpollSpeed) {
CM_DISPLAY_SPEED(&eKart.speed);
}
DRIVE_emitPollTorque(me, KART_CST.DRIVE_STOP_TIME*9, 0);
break;
case STDR_DEAD:
if (ev->id == evDRresurrect) {
me->state = STDR_WAIT;
}
break;
}
if(oldState != me->state){
switch (oldState) { // onExit
case STDR_INIT:
break;
case STDR_WAIT:
break;
case STDR_RUN:
break;
case STDR_DEAD:
break;
}
switch (me->state) { // onEntry
case STDR_INIT:
break;
case STDR_WAIT:
if (me->wait.f != NULL) {
me->wait.f(me->wait.p);
}
break;
case STDR_RUN:
if (me->run.f != NULL) {
me->run.f(me->run.p);
}
break;
case STDR_DEAD:
if (me->dead.f != NULL) {
me->dead.f(me->dead.p);
}
break;
}
processed = true;
}
return processed;
}
/*************
* Callbacks *
*************/
void DRIVE_onWait(DRIVE* me, DRIVE_CALLBACK_FUNCTION f, void* p) {
me->wait.f = f;
me->wait.p = p;
}
void DRIVE_onRun(DRIVE* me, DRIVE_CALLBACK_FUNCTION f, void* p) {
me->run.f = f;
me->run.p = p;
}
void DRIVE_onDead(DRIVE* me, DRIVE_CALLBACK_FUNCTION f, void* p) {
me->dead.f = f;
me->dead.p = p;
}
/************
* EMITTERS *
************/
void DRIVE_emitStart(void* p) {
DRIVE* me = (DRIVE*) p;
POST(me, &DRIVE_processEvent, evDRstart, 0, 0);
}
void DRIVE_emitStop(void* p) {
DRIVE* me = (DRIVE*) p;
POST(me, &DRIVE_processEvent, evDRstop, 0, 0);
}
void DRIVE_emitResurrect(void* p) {
DRIVE* me = (DRIVE*) p;
POST(me, &DRIVE_processEvent, evDRresurrect, 0, 0);
}
void DRIVE_emitPollSpeed(void* p) {
DRIVE* me = (DRIVE*) p;
POST(me, &DRIVE_processEvent, evDRpollSpeed, 0, 0);
}
void DRIVE_emitPollTorque(DRIVE* me, uint16_t t, int64_t data) {
POST(me, &DRIVE_processEvent, evDRpollTorque, t, data);
}
/***********
* SETTERS *
***********/
void DRIVE_setMyChecker(DRIVE* me, ALIVE v) {
me->myChecker = v;
}

View File

@ -0,0 +1,130 @@
/**
* @author Rémi Heredero
* @version 1.0.0
* @date August 2023
* @file drive.h
*/
#ifndef DRIVE_H
#define DRIVE_H
#include "../xf/xf.h"
#include "../middleware/alive.h"
typedef enum {
STDR_INIT,
STDR_WAIT,
STDR_RUN,
STDR_DEAD
} DRIVE_STATES;
typedef enum {
evDRinit = 100,
evDRstart,
evDRstop,
evDRresurrect,
evDRpollSpeed,
evDRpollTorque
} DRIVE_EVENTS;
typedef void (*DRIVE_CALLBACK_FUNCTION)(void*);
typedef struct {
DRIVE_CALLBACK_FUNCTION f; // function
void* p; // param(s)
} DRIVE_CALLBACK;
typedef struct {
DRIVE_STATES state;
ALIVE myChecker;
DRIVE_CALLBACK wait;
DRIVE_CALLBACK run;
DRIVE_CALLBACK dead;
} DRIVE;
/**
* Initialize the DRIVE
* @param me the DRIVE itself
*/
void DRIVE_init(DRIVE* me);
/**
* Start the DRIVE state machine
* @param me the DRIVE itself
*/
void DRIVE_startBehaviour(DRIVE* me);
/**
* Process the event
* @param ev the event to process
* @return true if the event is processed
*/
bool DRIVE_processEvent(Event* ev);
/*************
* Callbacks *
*************/
/**
* Set the callback function to call when the DRIVE is entering state wait
* @param me the DRIVE itself
* @param f the function to call
* @param p the param(s) to pass to the function
*/
void DRIVE_onWait(DRIVE* me, DRIVE_CALLBACK_FUNCTION f, void* p);
/**
* Set the callback function to call when the DRIVE is entering state run
* @param me the DRIVE itself
* @param f the function to call
* @param p the param(s) to pass to the function
*/
void DRIVE_onRun(DRIVE* me, DRIVE_CALLBACK_FUNCTION f, void* p);
/**
* Set the callback function to call when the DRIVE is entering state dead
* @param me the DRIVE itself
* @param f the function to call
* @param p the param(s) to pass to the function
*/
void DRIVE_onDead(DRIVE* me, DRIVE_CALLBACK_FUNCTION f, void* p);
/************
* EMITTERS *
************/
/**
* Emit the start event
* @param p the DRIVE itself
*/
void DRIVE_emitStart(void* p);
/**
* Emit the stop event
* @param p the DRIVE itself
*/
void DRIVE_emitStop(void* p);
/**
* Emit the resurrect event
* @param p the DRIVE itself
*/
void DRIVE_emitResurrect(void* p);
/**
* Emit the pollSpeed event
* @param p the DRIVE itself
*/
void DRIVE_emitPollSpeed(void* p);
/**
* Emit the pollTorque event
* @param p the DRIVE itself
*/
void DRIVE_emitPollTorque(DRIVE* me, uint16_t t, int64_t data);
/***********
* SETTERS *
***********/
#endif

View File

@ -0,0 +1,139 @@
/**
* @author R<EFBFBD>mi Heredero
* @version 1.0.0
* @date August 2023
* @file eeprom_interface.h
*/
#include "eeprom.h"
#include "../app/car.h"
typedef union {
struct {
uint8_t byte0;
uint8_t byte1;
uint8_t byte2;
uint8_t byte3;
} separate;
uint32_t full;
uint8_t array[4];
} BYTES_4;
void MEM_init(){
uint8_t check = MEM_read_1_byte(0x0);
if(check != 0x2A){
KART_CST.CONTROL_STEERING_MODE = 0;
KART_CST.CONTROL_ALIVE_TIME = 50;
KART_CST.CONTROL_SPEED_FACTOR = 111111;
KART_CST.CONTROL_POWER_FACTOR = 10000;
KART_CST.CONTROL_STEERING_FACTOR = 400000000;
KART_CST.CONTROL_MAX_SPEED_FW = 50;
KART_CST.CONTROL_MAX_SPEED_BW = 25;
KART_CST.JOYSTICK_MODE = 0;
KART_CST.JOYSTICK_PARAM1 = 5;
KART_CST.JOYSTICK_PARAM2 = 1;
KART_CST.JOYSTICK_ALIVE_TIME = 25;
KART_CST.DISPLAY_ALIVE_TIME = 100;
KART_CST.DRIVE_SPEED_TIME = 20;
KART_CST.DRIVE_STOP_TIME = 10;
KART_CST.DRIVE_ALIVE_TIME = 250;
KART_CST.STEERING_ALIVE_TIME = 100;
KART_CST.BATTERY_VOLT_TIME = 50;
KART_CST.BATTERY_CURRENT_TIME = 50;
KART_CST.BATTERY_ENERGY_TIME = 50;
KART_CST.BATTERY_ALIVE_TIME = 50;
MEM_write_1_byte(MEMADD_CONTROL_STEERING_MODE, KART_CST.CONTROL_STEERING_MODE);
MEM_write_1_byte(MEMADD_CONTROL_ALIVE_TIME, KART_CST.CONTROL_ALIVE_TIME);
MEM_write_4_byte(MEMADD_CONTROL_SPEED_FACTOR, KART_CST.CONTROL_SPEED_FACTOR);
MEM_write_4_byte(MEMADD_CONTROL_POWER_FACTOR, KART_CST.CONTROL_POWER_FACTOR);
MEM_write_4_byte(MEMADD_CONTROL_STEERING_FACTOR, KART_CST.CONTROL_STEERING_FACTOR);
MEM_write_1_byte(MEMADD_CONTROL_MAX_SPEED_FW, KART_CST.CONTROL_MAX_SPEED_FW);
MEM_write_1_byte(MEMADD_CONTROL_MAX_SPEED_BW, KART_CST.CONTROL_MAX_SPEED_BW);
MEM_write_1_byte(MEMADD_JOYSTICK_MODE, KART_CST.JOYSTICK_MODE);
MEM_write_1_byte(MEMADD_JOYSTICK_PARAM1, KART_CST.JOYSTICK_PARAM1);
MEM_write_1_byte(MEMADD_JOYSTICK_PARAM2, KART_CST.JOYSTICK_PARAM2);
MEM_write_1_byte(MEMADD_JOYSTICK_ALIVE_TIME, KART_CST.JOYSTICK_ALIVE_TIME);
MEM_write_1_byte(MEMADD_DISPLAY_ALIVE_TIME, KART_CST.DISPLAY_ALIVE_TIME);
MEM_write_1_byte(MEMADD_DRIVE_SPEED_TIME, KART_CST.DRIVE_SPEED_TIME);
MEM_write_1_byte(MEMADD_DRIVE_STOP_TIME, KART_CST.DRIVE_STOP_TIME);
MEM_write_1_byte(MEMADD_DRIVE_ALIVE_TIME, KART_CST.DRIVE_ALIVE_TIME);
MEM_write_1_byte(MEMADD_STEERING_ALIVE_TIME, KART_CST.STEERING_ALIVE_TIME);
MEM_write_1_byte(MEMADD_BATTERY_VOLT_TIME, KART_CST.BATTERY_VOLT_TIME);
MEM_write_1_byte(MEMADD_BATTERY_CURRENT_TIME, KART_CST.BATTERY_CURRENT_TIME);
MEM_write_1_byte(MEMADD_BATTERY_ENERGY_TIME, KART_CST.BATTERY_ENERGY_TIME);
MEM_write_1_byte(MEMADD_BATTERY_ALIVE_TIME, KART_CST.BATTERY_ALIVE_TIME);
MEM_write_1_byte(0x0, 0x2A);
} else {
KART_CST.CONTROL_STEERING_MODE = MEM_read_1_byte(MEMADD_CONTROL_STEERING_MODE);
KART_CST.CONTROL_ALIVE_TIME = MEM_read_1_byte(MEMADD_CONTROL_ALIVE_TIME);
KART_CST.CONTROL_SPEED_FACTOR = MEM_read_1_byte(MEMADD_CONTROL_SPEED_FACTOR);
KART_CST.CONTROL_POWER_FACTOR = MEM_read_1_byte(MEMADD_CONTROL_POWER_FACTOR);
KART_CST.CONTROL_STEERING_FACTOR = MEM_read_1_byte(MEMADD_CONTROL_STEERING_FACTOR);
KART_CST.CONTROL_MAX_SPEED_FW = MEM_read_1_byte(MEMADD_CONTROL_MAX_SPEED_FW);
KART_CST.CONTROL_MAX_SPEED_BW = MEM_read_1_byte(MEMADD_CONTROL_MAX_SPEED_BW);
KART_CST.JOYSTICK_MODE = MEM_read_1_byte(MEMADD_JOYSTICK_MODE);
KART_CST.JOYSTICK_PARAM1 = MEM_read_1_byte(MEMADD_JOYSTICK_PARAM1);
KART_CST.JOYSTICK_PARAM2 = MEM_read_1_byte(MEMADD_JOYSTICK_PARAM2);
KART_CST.JOYSTICK_ALIVE_TIME = MEM_read_1_byte(MEMADD_JOYSTICK_ALIVE_TIME);
KART_CST.DISPLAY_ALIVE_TIME = MEM_read_1_byte(MEMADD_DISPLAY_ALIVE_TIME);
KART_CST.DRIVE_SPEED_TIME = MEM_read_1_byte(MEMADD_DRIVE_SPEED_TIME);
KART_CST.DRIVE_STOP_TIME = MEM_read_1_byte(MEMADD_DRIVE_STOP_TIME);
KART_CST.DRIVE_ALIVE_TIME = MEM_read_1_byte(MEMADD_DRIVE_ALIVE_TIME);
KART_CST.STEERING_ALIVE_TIME = MEM_read_1_byte(MEMADD_STEERING_ALIVE_TIME);
KART_CST.BATTERY_VOLT_TIME = MEM_read_1_byte(MEMADD_BATTERY_VOLT_TIME);
KART_CST.BATTERY_CURRENT_TIME = MEM_read_1_byte(MEMADD_BATTERY_CURRENT_TIME);
KART_CST.BATTERY_ENERGY_TIME = MEM_read_1_byte(MEMADD_BATTERY_ENERGY_TIME);
KART_CST.BATTERY_ALIVE_TIME = MEM_read_1_byte(MEMADD_BATTERY_ALIVE_TIME);
}
}
void MEM_reset() {
MEM_write_1_byte(0x0, 0x0);
}
void MEM_write_1_byte(uint8_t address, uint8_t data) {
DATAEE_WriteByte(address, data);
}
void MEM_write_4_byte(uint8_t address, uint32_t data) {
BYTES_4 tmpData;
tmpData.full = data;
for(uint8_t i = 0; i<4;i++) {
uint8_t add = address;
add += i;
MEM_write_1_byte(add, tmpData.array[i]);
}
}
uint8_t MEM_read_1_byte(uint8_t address) {
return DATAEE_ReadByte(address);
}
uint32_t MEM_read_4_byte(uint8_t address) {
BYTES_4 tmpData;
for(uint8_t i = 0; i<4;i++) {
uint8_t add = address;
add += i;
tmpData.array[i] = MEM_read_1_byte(add);
}
return tmpData.full;
}

View File

@ -0,0 +1,22 @@
/**
* @author R<EFBFBD>mi Heredero
* @version 1.0.0
* @date August 2023
* @file eeprom_interface.h
*/
#ifndef EEPROM_INTERFACE_H
#define EEPROM_INTERFACE_H
#include <stdint.h> // usage of standard types
#include <stdbool.h> // usage of boolean types
#include "../mcc_generated_files/mcc.h"
void MEM_init();
void MEM_reset();
void MEM_write_1_byte(uint8_t address, uint8_t data);
void MEM_write_4_byte(uint8_t address, uint32_t data);
uint8_t MEM_read_1_byte(uint8_t address);
uint32_t MEM_read_4_byte(uint8_t address);
#endif /* EEPROM_INTERFACE_H */

View File

@ -30,12 +30,20 @@ LED* l8() {
return &theFactory.l8_;
}
WATCHDOG* WDcontroller(){
return &theFactory.WDcontroller_;
BLINKER* b1() {
return &theFactory.b1_;
}
ALIVE_CHECKER* ACjoy() {
return &theFactory.ACjoy_;
ALIVE* ALcontroller(){
return &theFactory.ALcontroller_;
}
ALIVE* ALjoy(){
return &theFactory.ALjoy_;
}
DRIVE* drive(){
return &theFactory.drive_;
}
@ -59,23 +67,19 @@ void Factory_init() {
LED_initHW(l7());
LED_initHW(l8());
BLINKER_init(b1());
CAN_init();
CAN_setSender(1);
LED_off(l1());
// TODO init EPROM interface
MEM_init();
// TODO init watchdog with EPROM CST
WATCHDOG_init(WDcontroller());
CAR_CST.CONTROL_ALIVE_TIME = 100;
WATCHDOG_setTime(WDcontroller(), CAR_CST.CONTROL_ALIVE_TIME);
ALIVE_init(ALcontroller());
ALIVE_setAliveTime(ALcontroller(), KART_CST.CONTROL_ALIVE_TIME);
// TODO init ALIVE CHECKER with EPROM CST
CAR_CST.JOYSTICK_MODE = 0;
CAR_CST.JOYSTICK_PARAM1 = 100;
CAR_CST.JOYSTICK_PARAM2 = 1;
CAR_CST.JOYSTICK_ALIVE_TIME = 10;
ALIVE_CHECKER_init(ACjoy());
ALIVE_init(ALjoy());
DRIVE_init(drive());
}
//connect objects if required
@ -83,20 +87,32 @@ void Factory_build() {
ECAN_SetRXBnInterruptHandler(CAN_newMsg);
CAN_onReceiveCan(CM_processIncome);
WATCHDOG_onAlive(WDcontroller(), CM_CONTROLLER_ALIVE, NULL);
ALIVE_CHECKER_onSetup(ACjoy(), CM_JOY_SETUP, NULL);
ALIVE_CHECKER_setAliveTime(ACjoy(), CAR_CST.JOYSTICK_ALIVE_TIME);
ALIVE_CHECKER_onBorn(ACjoy(), LED_on, l1());
ALIVE_CHECKER_onDead(ACjoy(), LED_off, l1());
ALIVE_onAlive(ALcontroller(), CM_CONTROLLER_ALIVE, NULL);
//BLINKER_onOn(b1(), LED_on, l6());
//BLINKER_onOff(b1(), LED_off, l6());
ALIVE_onSetup(ALjoy(), CM_JOY_SETUP, NULL);
ALIVE_setAliveTime(ALjoy(), KART_CST.JOYSTICK_ALIVE_TIME);
ALIVE_onBorn(ALjoy(), LED_on, l1());
ALIVE_onDead(ALjoy(), LED_off, l1());
DRIVE_onRun(drive(), LED_on, l2());
DRIVE_onDead(drive(), LED_off, l2());
}
//start all state machines
void Factory_start() {
CAN_startBehaviour();
WATCHDOG_startBehaviour(WDcontroller());
ALIVE_CHECKER_startBehaviour(ACjoy());
ALIVE_CHECKER_emitBorn(ACjoy(), 100, 0);
ALIVE_CHECKER_emitReady(ACjoy(), 200, 0);
DRIVE_startBehaviour(drive());
ALIVE_startBehaviourSender(ALcontroller());
ALIVE_startBehaviourChecker(ALjoy());
ALIVE_emitBorn(ALjoy(), 100, 0);
ALIVE_emitReady(ALjoy(), 200, 0);
}

View File

@ -14,11 +14,13 @@
#include "../car.h"
#include "../can_message.h"
#include "../eeprom.h"
#include "../drive.h"
#include "../../board/led/led.h"
#include "../../board/button/button.h"
#include "../../middleware/alive_checker.h"
#include "../../middleware/alive.h"
#include "../../middleware/can_interface.h"
#include "../../middleware/watchdog.h"
#include "../../middleware/blinker.h"
typedef struct {
@ -31,8 +33,11 @@ typedef struct {
LED l7_;
LED l8_;
WATCHDOG WDcontroller_;
ALIVE_CHECKER ACjoy_;
BLINKER b1_;
ALIVE ALcontroller_;
ALIVE ALjoy_;
DRIVE drive_;
} Factory;
@ -51,8 +56,11 @@ LED* l6();
LED* l7();
LED* l8();
WATCHDOG* WDcontroller();
ALIVE_CHECKER* ACjoy();
BLINKER* b1();
ALIVE* ALcontroller();
ALIVE* ALjoy();
DRIVE* drive();
#endif

View File

@ -0,0 +1,47 @@
/**
* @author Rémi Heredero
* @version. 0.0.0
* @date August 2023
* @file kartculator.c
*/
#include "kartculator.h"
void calcTorque(uint8_t joy_pos) {
int32_t calcTorque;
calcTorque = (int8_t) joy_pos; // joystick position
calcTorque *= KART_CST.CONTROL_POWER_FACTOR; // convert by power factor
calcTorque /= 1000; // torque define by joystick
eKart.torque = (int16_t) calcTorque;
}
void calcPosition(uint8_t joy_pos){
int32_t calcPosition;
calcPosition = (int8_t) joy_pos;
}
void calcSpeed(int32_t rpm) {
int32_t calcSpeed;
if(rpm>=0){
calcSpeed = rpm;
} else {
calcSpeed = -rpm;
}
calcSpeed *= 1000;
calcSpeed /= KART_CST.CONTROL_SPEED_FACTOR;
eKart.speed = (uint8_t) calcSpeed;
}
int16_t getTorque() {
}
uint32_t getPosition() {
}
uint8_t getSpeed() {
}

View File

@ -0,0 +1,24 @@
/**
* @author Rémi Heredero
* @version. 0.0.0
* @date August 2023
* @file kartculator.h
*/
#ifndef KARTCULATOR_H
#define KARTCULATOR_H
#include <stdint.h> // usage of standard types
#include <stdbool.h> // usage of boolean types
#include "../mcc_generated_files/mcc.h"
#include "car.h"
void calcTorque(uint8_t joy_pos);
void calcPosition(uint8_t joy_pos);
void calcSpeed(int32_t rpm);
int16_t getTorque();
uint32_t getPosition();
uint8_t getSpeed();
#endif /* KARTCULATOR_H */

Binary file not shown.

View File

@ -10,8 +10,6 @@ void main(void)
// Initialize the device
SYSTEM_Initialize();
// Enable the Global Interrupts
INTERRUPT_GlobalInterruptEnable();
// Disable the Global Interrupts
// INTERRUPT_GlobalInterruptDisable();
@ -29,6 +27,8 @@ void main(void)
// TMR0 is interrupting. Important: Set the TICKINTERVAL define in
//the xf.h file to the same value as the TMR0 value.
TMR0_SetInterruptHandler(XF_decrementAndQueueTimers);
// Enable the Global Interrupts
INTERRUPT_GlobalInterruptEnable();
while (1)
{

View File

@ -14,7 +14,7 @@
This header file provides implementations for driver APIs for all modules selected in the GUI.
Generation Information :
Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8
Device : PIC18F25K83
Device : PIC18F26K83
Driver Version : 2.00
The generated drivers are tested against the following:
Compiler : XC8 2.36 and above or later

View File

@ -14,7 +14,7 @@
This header file provides implementations for driver APIs for all modules selected in the GUI.
Generation Information :
Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8
Device : PIC18F25K83
Device : PIC18F26K83
Driver Version : 2.00
The generated drivers are tested against the following:
Compiler : XC8 2.36 and above or later

View File

@ -130,17 +130,21 @@ void ECAN_Initialize(void)
/*
* ENABLE FILTERS
*
* Filter 0 set on mask 0
* Filter 1 set on mask 0
* Filter 2 set on mask 1
* RXF7EN RXF6EN RXF5EN RXF4EN RXF3EN RXF2EN RXF1EN RXF0EN
* 0b 00000111
*/
RXFCON0 = 0x07;
/**
Assign Filters to Masks
/*
* Assign Filters to Masks
*
* Filter 0 set on mask 0
* Filter 1 set on mask 0
* Filter 2 set on mask 1
* 0b F3 F2 F1 F0
* 0b 00 01 00 00
*/
// Filter 0 & 1 assigned to mask 0 and filter 2 assigned to mask 1
MSEL0 = 0x10;
/**

View File

@ -16,7 +16,7 @@
all modules selected in the GUI.
Generation Information :
Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8
Device : PIC18F25K83
Device : PIC18F26K83
Driver Version : 2.04
The generated drivers are tested against the following:
Compiler : XC8 2.36 and above or later

View File

@ -16,7 +16,7 @@
all modules selected in the GUI.
Generation Information :
Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8
Device : PIC18F25K83
Device : PIC18F26K83
Driver Version : 2.03
The generated drivers are tested against the following:
Compiler : XC8 2.36 and above or later

View File

@ -14,7 +14,7 @@
This header file provides implementations for driver APIs for all modules selected in the GUI.
Generation Information :
Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8
Device : PIC18F25K83
Device : PIC18F26K83
Driver Version : 2.00
The generated drivers are tested against the following:
Compiler : XC8 2.36 and above or later

View File

@ -14,7 +14,7 @@
This header file provides implementations for driver APIs for all modules selected in the GUI.
Generation Information :
Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8
Device : PIC18F25K83
Device : PIC18F26K83
Driver Version : 2.00
The generated drivers are tested against the following:
Compiler : XC8 2.36 and above or later

View File

@ -14,7 +14,7 @@
This file provides implementations of driver APIs for MEMORY.
Generation Information :
Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8
Device : PIC18F25K83
Device : PIC18F26K83
Driver Version : 2.1.3
The generated drivers are tested against the following:
Compiler : XC8 2.36 and above
@ -198,7 +198,6 @@ uint8_t DATAEE_ReadByte(uint16_t bAdd)
void MEMORY_Tasks( void )
{
/* TODO : Add interrupt handling code */
PIR0bits.NVMIF = 0;
}
/**

View File

@ -14,7 +14,7 @@
This header file provides APIs for driver for MEMORY.
Generation Information :
Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8
Device : PIC18F25K83
Device : PIC18F26K83
Driver Version : 2.1.3
The generated drivers are tested against the following:
Compiler : XC8 2.36 and above
@ -64,9 +64,9 @@
Section: Macro Declarations
*/
#define WRITE_FLASH_BLOCKSIZE 64
#define ERASE_FLASH_BLOCKSIZE 64
#define END_FLASH 0x008000
#define WRITE_FLASH_BLOCKSIZE 128
#define ERASE_FLASH_BLOCKSIZE 128
#define END_FLASH 0x010000
/**
Section: Flash Module APIs

View File

@ -14,7 +14,7 @@
This header file provides implementations for pin APIs for all pins selected in the GUI.
Generation Information :
Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8
Device : PIC18F25K83
Device : PIC18F26K83
Driver Version : 2.11
The generated drivers are tested against the following:
Compiler : XC8 2.36 and above

View File

@ -14,7 +14,7 @@
This header file provides APIs for driver for .
Generation Information :
Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8
Device : PIC18F25K83
Device : PIC18F26K83
Driver Version : 2.11
The generated drivers are tested against the following:
Compiler : XC8 2.36 and above

View File

@ -14,7 +14,7 @@
This source file provides APIs for TMR0.
Generation Information :
Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8
Device : PIC18F25K83
Device : PIC18F26K83
Driver Version : 3.10
The generated drivers are tested against the following:
Compiler : XC8 2.36 and above

View File

@ -14,7 +14,7 @@
This header file provides APIs for TMR0.
Generation Information :
Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8
Device : PIC18F25K83
Device : PIC18F26K83
Driver Version : 3.10
The generated drivers are tested against the following:
Compiler : XC8 2.36 and above

View File

@ -0,0 +1,265 @@
/**
* @author Rémi Heredero
* @version 1.0.0
* @date August 2023
* @file alive.c
*/
#include "alive.h"
void ALIVE_init(ALIVE* me){
me->state = STAL_INIT;
me->isAlive = false;
me->checker = false;
me->sender = false;
me->haveBreak = true;
me->aliveTime = 10;
me->setup.f = NULL;
me->born.f = NULL;
me->wait.f = NULL;
me->dead.f = NULL;
me->alive.f = NULL;
me->break_cb.f = NULL;
}
void ALIVE_startBehaviourChecker(ALIVE* me){
POST(me, &ALIVE_processEvent, evALinitChecker, 0, 0);
}
void ALIVE_startBehaviourSender(ALIVE* me){
POST(me, &ALIVE_processEvent, evALinitSender, 0, 0);
}
bool ALIVE_processEvent(Event* ev) {
bool processed = false;
ALIVE* me = (ALIVE*)Event_getTarget(ev);
ALIVE_STATES oldState = me->state;
evIDT evid = Event_getId(ev);
uint64_t data = Event_getData(ev);
switch (me->state) { // onState
case STAL_INIT:
if (ev->id == evALinitChecker) {
me->state = STAL_SETUP;
}
if (ev->id == evALinitSender) {
me->state = STAL_ALIVE;
ALIVE_emitPoll(me, me->aliveTime*10, 0);
}
break;
case STAL_SETUP:
if (ev->id == evALborn) {
me->state = STAL_BORN;
}
break;
case STAL_BORN:
if (ev->id == evALready) {
me->state = STAL_WAIT;
ALIVE_emitPoll(me, me->aliveTime*10, 0);
}
break;
case STAL_WAIT:
if (ev->id == evALpoll) {
if (me->aliveTime == 0) {
if (me->haveBreak){
me->state = STAL_BREAK;
}
} else if (me->isAlive){
me->state = STAL_WAIT;
ALIVE_emitPoll(me, me->aliveTime*10, 0);
} else {
me->state = STAL_DEAD;
}
me->isAlive = false;
}
break;
case STAL_DEAD:
if (ev->id == evALresurrect) {
me->state = STAL_SETUP;
}
break;
case STAL_ALIVE:
if (ev->id == evALpoll) {
if (me->alive.f != NULL) {
me->alive.f(me->alive.p);
}
if (me->aliveTime == 0) {
if (me->haveBreak){
me->state = STAL_BREAK;
}
} else {
ALIVE_emitPoll(me, me->aliveTime*10, 0);
}
}
break;
case STAL_BREAK:
if (ev->id == evALstart) {
ALIVE_emitPoll(me, me->aliveTime*10, 0);
if (me->checker) {
me->state = STAL_WAIT;
}
if (me->sender) {
me->state = STAL_ALIVE;
}
}
break;
}
if(oldState != me->state){
switch (oldState) { // onExit
case STAL_INIT:
break;
case STAL_SETUP:
break;
case STAL_BORN:
break;
case STAL_WAIT:
break;
case STAL_DEAD:
break;
case STAL_ALIVE:
break;
case STAL_BREAK:
break;
}
switch (me->state) { // onEntry
case STAL_INIT:
break;
case STAL_SETUP:
me->checker = true;
if (me->setup.f != NULL) {
me->setup.f(me->setup.p);
}
break;
case STAL_BORN:
if (me->born.f != NULL) {
me->born.f(me->born.p);
}
break;
case STAL_WAIT:
if (me->wait.f != NULL) {
me->wait.f(me->wait.p);
}
break;
case STAL_DEAD:
if (me->dead.f != NULL) {
me->dead.f(me->dead.p);
}
break;
case STAL_ALIVE:
me->sender = true;
break;
case STAL_BREAK:
if (me->break_cb.f != NULL) {
me->break_cb.f(me->break_cb.p);
}
break;
}
processed = true;
}
return processed;
}
/*************
* Callbacks *
*************/
void ALIVE_onSetup(ALIVE* me, ALIVE_CALLBACK_FUNCTION f, void* p) {
me->setup.f = f;
me->setup.p = p;
}
void ALIVE_onBorn(ALIVE* me, ALIVE_CALLBACK_FUNCTION f, void* p) {
me->born.f = f;
me->born.p = p;
}
void ALIVE_onWait(ALIVE* me, ALIVE_CALLBACK_FUNCTION f, void* p) {
me->wait.f = f;
me->wait.p = p;
}
void ALIVE_onDead(ALIVE* me, ALIVE_CALLBACK_FUNCTION f, void* p) {
me->dead.f = f;
me->dead.p = p;
}
void ALIVE_onAlive(ALIVE* me, ALIVE_CALLBACK_FUNCTION f, void* p) {
me->alive.f = f;
me->alive.p = p;
}
void ALIVE_onBreak(ALIVE* me, ALIVE_CALLBACK_FUNCTION f, void* p) {
me->break_cb.f = f;
me->break_cb.p = p;
}
/************
* EMITTERS *
************/
void ALIVE_emitInitSender(ALIVE* me, uint16_t t, int64_t data) {
POST(me, &ALIVE_processEvent, evALinitSender, t, data);
}
void ALIVE_emitBorn(ALIVE* me, uint16_t t, int64_t data) {
POST(me, &ALIVE_processEvent, evALborn, t, data);
}
void ALIVE_emitReady(ALIVE* me, uint16_t t, int64_t data) {
POST(me, &ALIVE_processEvent, evALready, t, data);
}
void ALIVE_emitPoll(ALIVE* me, uint16_t t, int64_t data) {
POST(me, &ALIVE_processEvent, evALpoll, t, data);
}
void ALIVE_emitStart(ALIVE* me, uint16_t t, int64_t data) {
POST(me, &ALIVE_processEvent, evALstart, t, data);
}
void ALIVE_emitResurrect(ALIVE* me, uint16_t t, int64_t data) {
POST(me, &ALIVE_processEvent, evALresurrect, t, data);
}
/***********
* SETTERS *
***********/
void ALIVE_setIsAlive(ALIVE* me, bool v) {
me->isAlive = v;
}
void ALIVE_setHaveBreak(ALIVE* me, bool v) {
me->haveBreak = v;
}
void ALIVE_setAliveTime(ALIVE* me, uint8_t v) {
me->aliveTime = v;
}
void ALIVE_ISALIVE(ALIVE* me) {
ALIVE_setIsAlive(me, true);
}

View File

@ -0,0 +1,187 @@
/**
* @author Rémi Heredero
* @version 1.0.0
* @date August 2023
* @file alive.h
*/
#ifndef ALIVE_H
#define ALIVE_H
#include "../xf/xf.h"
typedef enum {
STAL_INIT,
STAL_SETUP,
STAL_BORN,
STAL_WAIT,
STAL_DEAD,
STAL_ALIVE,
STAL_BREAK
} ALIVE_STATES;
typedef enum {
evALinitChecker = 15,
evALinitSender,
evALborn,
evALready,
evALpoll,
evALstart,
evALresurrect
} ALIVE_EVENTS;
typedef void (*ALIVE_CALLBACK_FUNCTION)(void*);
typedef struct {
ALIVE_CALLBACK_FUNCTION f; // function
void* p; // param(s)
} ALIVE_CALLBACK;
typedef struct {
ALIVE_STATES state;
bool isAlive;
bool checker;
bool sender;
bool haveBreak;
uint8_t aliveTime;
ALIVE_CALLBACK setup;
ALIVE_CALLBACK born;
ALIVE_CALLBACK wait;
ALIVE_CALLBACK dead;
ALIVE_CALLBACK alive;
ALIVE_CALLBACK break_cb;
} ALIVE;
/**
* Initialize the ALIVE
* @param me the ALIVE itself
*/
void ALIVE_init(ALIVE* me);
/**
* Start the ALIVE state machine for checker part
* @param me the ALIVE itself
*/
void ALIVE_startBehaviourChecker(ALIVE* me);
/**
* Start the ALIVE state machine for sender part
* @param me the ALIVE itself
*/
void ALIVE_startBehaviourSender(ALIVE* me);
/**
* Process the event
* @param ev the event to process
* @return true if the event is processed
*/
bool ALIVE_processEvent(Event* ev);
/*************
* Callbacks *
*************/
/**
* Set the callback function to call when the ALIVE is entering state setup
* @param me the ALIVE itself
* @param f the function to call
* @param p the param(s) to pass to the function
*/
void ALIVE_onSetup(ALIVE* me, ALIVE_CALLBACK_FUNCTION f, void* p);
/**
* Set the callback function to call when the ALIVE is entering state born
* @param me the ALIVE itself
* @param f the function to call
* @param p the param(s) to pass to the function
*/
void ALIVE_onBorn(ALIVE* me, ALIVE_CALLBACK_FUNCTION f, void* p);
/**
* Set the callback function to call when the ALIVE is entering state wait
* @param me the ALIVE itself
* @param f the function to call
* @param p the param(s) to pass to the function
*/
void ALIVE_onWait(ALIVE* me, ALIVE_CALLBACK_FUNCTION f, void* p);
/**
* Set the callback function to call when the ALIVE is entering state dead
* @param me the ALIVE itself
* @param f the function to call
* @param p the param(s) to pass to the function
*/
void ALIVE_onDead(ALIVE* me, ALIVE_CALLBACK_FUNCTION f, void* p);
/**
* Set the callback function to call when the ALIVE is entering state alive
* @param me the ALIVE itself
* @param f the function to call
* @param p the param(s) to pass to the function
*/
void ALIVE_onAlive(ALIVE* me, ALIVE_CALLBACK_FUNCTION f, void* p);
/**
* Set the callback function to call when the ALIVE is entering state break
* @param me the ALIVE itself
* @param f the function to call
* @param p the param(s) to pass to the function
*/
void ALIVE_onBreak(ALIVE* me, ALIVE_CALLBACK_FUNCTION f, void* p);
/************
* EMITTERS *
************/
/**
* Emit the born event
* @param me the ALIVE itself
* @param t time to wait in ms before triggering event
* @param data data to put on the event for XF
*/
void ALIVE_emitBorn(ALIVE* me, uint16_t t, int64_t data);
/**
* Emit the ready event
* @param me the ALIVE itself
* @param t time to wait in ms before triggering event
* @param data data to put on the event for XF
*/
void ALIVE_emitReady(ALIVE* me, uint16_t t, int64_t data);
/**
* Emit the poll event
* @param me the ALIVE itself
* @param t time to wait in ms before triggering event
* @param data data to put on the event for XF
*/
void ALIVE_emitPoll(ALIVE* me, uint16_t t, int64_t data);
/**
* Emit the start event
* @param me the ALIVE itself
* @param t time to wait in ms before triggering event
* @param data data to put on the event for XF
*/
void ALIVE_emitStart(ALIVE* me, uint16_t t, int64_t data);
/**
* Emit the resurrect event
* @param me the ALIVE itself
* @param t time to wait in ms before triggering event
* @param data data to put on the event for XF
*/
void ALIVE_emitResurrect(ALIVE* me, uint16_t t, int64_t data);
/***********
* SETTERS *
***********/
void ALIVE_setIsAlive(ALIVE* me, bool v);
void ALIVE_setHaveBreak(ALIVE* me, bool v);
void ALIVE_setAliveTime(ALIVE* me, uint8_t v);
void ALIVE_ISALIVE(ALIVE* me);
#endif

View File

@ -1,176 +0,0 @@
/**
* @author Rémi Heredero
* @version 1.0.0
* @date August 2023
* @file alive_checker.c
*/
#include "alive_checker.h"
void ALIVE_CHECKER_init(ALIVE_CHECKER* me){
me->state = STAC_INIT;
me->isAlive = false;
me->aliveTime = 10;
me->setup.f = NULL;
me->born.f = NULL;
me->wait.f = NULL;
me->dead.f = NULL;
}
void ALIVE_CHECKER_startBehaviour(ALIVE_CHECKER* me){
POST(me, &ALIVE_CHECKER_processEvent, evACinit, 0, 0);
}
bool ALIVE_CHECKER_processEvent(Event* ev) {
bool processed = false;
ALIVE_CHECKER* me = (ALIVE_CHECKER*)Event_getTarget(ev);
ALIVE_CHECKER_STATES oldState = me->state;
evIDT evid = Event_getId(ev);
uint64_t data = Event_getData(ev);
switch (me->state) { // onState
case STAC_INIT:
if (ev->id == evACinit) {
me->state = STAC_SETUP;
}
break;
case STAC_SETUP:
if (ev->id == evACborn) {
me->state = STAC_BORN;
}
break;
case STAC_BORN:
if (ev->id == evACready) {
me->state = STAC_WAIT;
ALIVE_CHECKER_emitPoll(me, me->aliveTime*10, 0);
}
break;
case STAC_WAIT:
if (ev->id == evACpoll) {
if (me->isAlive) {
me->state = STAC_WAIT;
ALIVE_CHECKER_emitPoll(me, me->aliveTime*10, 0);
} else {
me->state = STAC_DEAD;
}
me->isAlive = false;
}
break;
case STAC_DEAD:
if(ev->id == evACborn) {
me->state = STAC_BORN;
}
break;
}
if(oldState != me->state){
switch (oldState) { // onExit
case STAC_INIT:
break;
case STAC_SETUP:
break;
case STAC_BORN:
break;
case STAC_WAIT:
break;
case STAC_DEAD:
break;
}
switch (me->state) { // onEntry
case STAC_INIT:
break;
case STAC_SETUP:
if (me->setup.f != NULL) {
me->setup.f(me->setup.p);
}
break;
case STAC_BORN:
if (me->born.f != NULL) {
me->born.f(me->born.p);
}
break;
case STAC_WAIT:
if (me->wait.f != NULL) {
me->wait.f(me->wait.p);
}
break;
case STAC_DEAD:
if (me->dead.f != NULL) {
me->dead.f(me->dead.p);
}
break;
}
processed = true;
}
return processed;
}
/*************
* Callbacks *
*************/
void ALIVE_CHECKER_onSetup(ALIVE_CHECKER* me, ALIVE_CHECKER_CALLBACK_FUNCTION f, void* p) {
me->setup.f = f;
me->setup.p = p;
}
void ALIVE_CHECKER_onBorn(ALIVE_CHECKER* me, ALIVE_CHECKER_CALLBACK_FUNCTION f, void* p) {
me->born.f = f;
me->born.p = p;
}
void ALIVE_CHECKER_onWait(ALIVE_CHECKER* me, ALIVE_CHECKER_CALLBACK_FUNCTION f, void* p) {
me->wait.f = f;
me->wait.p = p;
}
void ALIVE_CHECKER_onDead(ALIVE_CHECKER* me, ALIVE_CHECKER_CALLBACK_FUNCTION f, void* p) {
me->dead.f = f;
me->dead.p = p;
}
/************
* EMITTERS *
************/
void ALIVE_CHECKER_emitBorn(ALIVE_CHECKER* me, uint16_t t, int64_t data) {
POST(me, &ALIVE_CHECKER_processEvent, evACborn, t, data);
}
void ALIVE_CHECKER_emitReady(ALIVE_CHECKER* me, uint16_t t, int64_t data) {
POST(me, &ALIVE_CHECKER_processEvent, evACready, t, data);
}
void ALIVE_CHECKER_emitPoll(ALIVE_CHECKER* me, uint16_t t, int64_t data) {
POST(me, &ALIVE_CHECKER_processEvent, evACpoll, t, data);
}
/***********
* SETTERS *
***********/
void ALIVE_CHECKER_setAliveTime(ALIVE_CHECKER* me, uint8_t v) {
me->aliveTime = v;
}
void ALIVE_CHECKER_setIsAlive(ALIVE_CHECKER* me, bool v) {
me->isAlive = v;
}
void ALIVE_CHECKER_ISALIVE(ALIVE_CHECKER* me) {
ALIVE_CHECKER_setIsAlive(me, true);
}

View File

@ -1,134 +0,0 @@
/**
* @author Rémi Heredero
* @version 1.0.0
* @date August 2023
* @file alive_checker.h
*/
#ifndef ALIVE_CHECKER_H
#define ALIVE_CHECKER_H
#include "../xf/xf.h"
typedef enum {
STAC_INIT,
STAC_SETUP,
STAC_BORN,
STAC_WAIT,
STAC_DEAD
} ALIVE_CHECKER_STATES;
typedef enum {
evACinit = 15,
evACborn,
evACready,
evACpoll
} ALIVE_CHECKER_EVENTS;
typedef void (*ALIVE_CHECKER_CALLBACK_FUNCTION)(void*);
typedef struct {
ALIVE_CHECKER_CALLBACK_FUNCTION f; // function
void* p; // param(s)
} ALIVE_CHECKER_CALLBACK;
typedef struct {
ALIVE_CHECKER_STATES state;
bool isAlive;
uint8_t aliveTime;
ALIVE_CHECKER_CALLBACK setup;
ALIVE_CHECKER_CALLBACK born;
ALIVE_CHECKER_CALLBACK wait;
ALIVE_CHECKER_CALLBACK dead;
} ALIVE_CHECKER;
/**
* Initialize the ALIVE_CHECKER
* @param me the ALIVE_CHECKER itself
*/
void ALIVE_CHECKER_init(ALIVE_CHECKER* me);
/**
* Start the ALIVE_CHECKER state machine
* @param me the ALIVE_CHECKER itself
*/
void ALIVE_CHECKER_startBehaviour(ALIVE_CHECKER* me);
/**
* Process the event
* @param ev the event to process
* @return true if the event is processed
*/
bool ALIVE_CHECKER_processEvent(Event* ev);
/*************
* Callbacks *
*************/
/**
* Set the callback function to call when the ALIVE_CHECKER is entering state setup
* @param me the ALIVE_CHECKER itself
* @param f the function to call
* @param p the param(s) to pass to the function
*/
void ALIVE_CHECKER_onSetup(ALIVE_CHECKER* me, ALIVE_CHECKER_CALLBACK_FUNCTION f, void* p);
/**
* Set the callback function to call when the ALIVE_CHECKER is entering state born
* @param me the ALIVE_CHECKER itself
* @param f the function to call
* @param p the param(s) to pass to the function
*/
void ALIVE_CHECKER_onBorn(ALIVE_CHECKER* me, ALIVE_CHECKER_CALLBACK_FUNCTION f, void* p);
/**
* Set the callback function to call when the ALIVE_CHECKER is entering state wait
* @param me the ALIVE_CHECKER itself
* @param f the function to call
* @param p the param(s) to pass to the function
*/
void ALIVE_CHECKER_onWait(ALIVE_CHECKER* me, ALIVE_CHECKER_CALLBACK_FUNCTION f, void* p);
/**
* Set the callback function to call when the ALIVE_CHECKER is entering state dead
* @param me the ALIVE_CHECKER itself
* @param f the function to call
* @param p the param(s) to pass to the function
*/
void ALIVE_CHECKER_onDead(ALIVE_CHECKER* me, ALIVE_CHECKER_CALLBACK_FUNCTION f, void* p);
/************
* EMITTERS *
************/
/**
* Emit the born event
* @param me the ALIVE_CHECKER itself
* @param t time to wait in ms before triggering event
* @param data data to put on the event for XF
*/
void ALIVE_CHECKER_emitBorn(ALIVE_CHECKER* me, uint16_t t, int64_t data);
/**
* Emit the ready event
* @param me the ALIVE_CHECKER itself
* @param t time to wait in ms before triggering event
* @param data data to put on the event for XF
*/
void ALIVE_CHECKER_emitReady(ALIVE_CHECKER* me, uint16_t t, int64_t data);
/**
* Emit the poll event
* @param me the ALIVE_CHECKER itself
* @param t time to wait in ms before triggering event
* @param data data to put on the event for XF
*/
void ALIVE_CHECKER_emitPoll(ALIVE_CHECKER* me, uint16_t t, int64_t data);
/***********
* SETTERS *
***********/
void ALIVE_CHECKER_setAliveTime(ALIVE_CHECKER* me, uint8_t v);
void ALIVE_CHECKER_setIsAlive(ALIVE_CHECKER* me, bool v);
void ALIVE_CHECKER_ISALIVE(ALIVE_CHECKER* me); // Use this one when you receive CAN message
#endif

View File

@ -0,0 +1,189 @@
/**
* @author Rémi Heredero
* @version 1.0.0
* @date July 2023
* @file blinker.c
*/
#include "blinker.h"
void BLINKER_init(BLINKER* me){
me->state = STBL_INIT;
me->timeOn = 500;
me->timeOff = 500;
me->numberOfBlink = 3;
me->nBlinkIsOn = false;
me->remainBlinks = 3;
me->wait.f = NULL;
me->on.f = NULL;
me->off.f = NULL;
me->finished.f = NULL;
}
void BLINKER_startBehaviour(BLINKER* me) {
POST(me, &BLINKER_processEvent, evBLinit, 0, 0);
}
bool BLINKER_processEvent(Event* ev) {
bool processed = false;
BLINKER* me = (BLINKER*)Event_getTarget(ev);
BLINKER_STATES oldState = me->state;
evIDT evid = Event_getId(ev);
switch (me->state) { // onState
case STBL_INIT:
if (ev->id == evBLinit) {
me->state = STBL_WAIT;
}
break;
case STBL_WAIT:
me->remainBlinks = me->numberOfBlink;
if(evid == evBLblinkN) {
me->state = STBL_ON;
me->nBlinkIsOn = true;
BLINKER_emitTimer(me, me->timeOn);
}
if(evid == evBLblink) {
me->state = STBL_ON;
me->nBlinkIsOn = false;
BLINKER_emitTimer(me, me->timeOn);
}
break;
case STBL_ON:
if (me->nBlinkIsOn) {
me->remainBlinks--;
}
if (evid == evBLtimer) {
me->state = STBL_OFF;
BLINKER_emitTimer(me, me->timeOff);
}
break;
case STBL_OFF:
if (evid == evBLtimer) {
if (me->remainBlinks == 0) {
me->state = STBL_WAIT;
if (me->finished.f != NULL) {
me->finished.f(me->finished.p);
}
} else {
me->state = STBL_ON;
BLINKER_emitTimer(me, me->timeOn);
}
}
break;
}
if(oldState != me->state){
switch (oldState) { // onExit
case STBL_INIT:
break;
case STBL_WAIT:
break;
case STBL_ON:
break;
case STBL_OFF:
break;
}
switch (me->state) { // onEntry
case STBL_INIT:
break;
case STBL_WAIT:
if (me->wait.f != NULL) {
me->wait.f(me->wait.p);
}
break;
case STBL_ON:
if (me->on.f != NULL) {
me->on.f(me->on.p);
}
break;
case STBL_OFF:
if (me->off.f != NULL) {
me->off.f(me->off.p);
}
break;
}
processed = true;
}
return processed;
}
/*************
* Callbacks *
*************/
void BLINKER_onWait(BLINKER* me, BLINKER_CALLBACK_FUNCTION f, void* p) {
me->wait.f = f;
me->wait.p = p;
}
void BLINKER_onOn(BLINKER* me, BLINKER_CALLBACK_FUNCTION f, void* p) {
me->on.f = f;
me->on.p = p;
}
void BLINKER_onOff(BLINKER* me, BLINKER_CALLBACK_FUNCTION f, void* p) {
me->off.f = f;
me->off.p = p;
}
void BLINKER_onFinished(BLINKER* me, BLINKER_CALLBACK_FUNCTION f, void* p) {
me->finished.f = f;
me->finished.p = p;
}
/************
* EMITTERS *
************/
void BLINKER_emitBlink(BLINKER* me, uint16_t t) {
POST(me, &BLINKER_processEvent, evBLblink, t, 0);
}
void BLINKER_emitBlinkN(BLINKER* me, uint16_t t) {
POST(me, &BLINKER_processEvent, evBLblinkN, t, 0);
}
void BLINKER_emitTimer(BLINKER* me, uint16_t t) {
POST(me, &BLINKER_processEvent, evBLtimer, t, 0);
}
/***********
* SETTERS *
***********/
void BLINKER_setTimeOn(BLINKER* me, uint16_t v) {
me->timeOn = v;
}
void BLINKER_setTimeOff(BLINKER* me, uint16_t v) {
me->timeOff = v;
}
void BLINKER_setNumberOfBlink(BLINKER* me, uint8_t v) {
me->numberOfBlink = v;
}
void BLINKER_setNBlinkIsOn(BLINKER* me, bool v) {
me->nBlinkIsOn = v;
}
void BLINKER_setRemainBlinks(BLINKER* me, uint8_t v) {
me->remainBlinks = v;
}
void BLINKER_endBlink(BLINKER* me) {
me->remainBlinks = 0;
}

View File

@ -0,0 +1,167 @@
/**
* @author Rémi Heredero
* @version 1.0.0
* @date July 2023
* @file blinker.h
*/
#ifndef BLINKER_H
#define BLINKER_H
#include "../xf/xf.h"
typedef enum {
STBL_INIT,
STBL_WAIT,
STBL_ON,
STBL_OFF
} BLINKER_STATES;
typedef enum {
evBLinit = 200,
evBLblink,
evBLblinkN,
evBLtimer
} BLINKER_EVENTS;
typedef void (*BLINKER_CALLBACK_FUNCTION)(void*);
typedef struct {
BLINKER_CALLBACK_FUNCTION f; // function
void* p; // param(s)
} BLINKER_CALLBACK;
typedef struct {
BLINKER_STATES state; //Actual state
uint16_t timeOn; // Time on
uint16_t timeOff; // Time off
uint8_t numberOfBlink; // Number of blink for this blinker when start with blinkN
bool nBlinkIsOn; // If the nBlink way is enable
uint8_t remainBlinks; // Actual remain blink
BLINKER_CALLBACK wait;
BLINKER_CALLBACK on;
BLINKER_CALLBACK off;
BLINKER_CALLBACK finished;
} BLINKER;
/**
* Initialize the BLINKER
* @param me the BLINKER itself
*/
void BLINKER_init(BLINKER* me);
/**
* Start the BLINKER state machine
* @param me the BLINKER itself
*/
void BLINKER_startBehaviour(BLINKER* me);
/**
* Process the event
* @param ev the event to process
* @return true if the event is processed
*/
bool BLINKER_processEvent(Event* ev);
/*************
* Callbacks *
*************/
/**
* Set the callback function to call when the BLINKER is entering state wait
* @param me the BLINKER itself
* @param f the function to call
* @param p the param(s) to pass to the function
*/
void BLINKER_onWait(BLINKER* me, BLINKER_CALLBACK_FUNCTION f, void* p);
/**
* Set the callback function to call when the BLINKER is entering state on
* @param me the BLINKER itself
* @param f the function to call
* @param p the param(s) to pass to the function
*/
void BLINKER_onOn(BLINKER* me, BLINKER_CALLBACK_FUNCTION f, void* p);
/**
* Set the callback function to call when the BLINKER is entering state off
* @param me the BLINKER itself
* @param f the function to call
* @param p the param(s) to pass to the function
*/
void BLINKER_onOff(BLINKER* me, BLINKER_CALLBACK_FUNCTION f, void* p);
/**
* Set the callabck function to call when the BLINKER is entering state finished
* @param me the BLINKER itself
* @param f the function to call
* @param t the param(s) to pass to the function
*/
void BLINKER_onFinished(BLINKER* me, BLINKER_CALLBACK_FUNCTION f, void* p);
/************
* EMITTERS *
************/
/**
* Emit the blink event
* @param me the BLINKER itself
* @param t time to wait in ms before triggering event
*/void BLINKER_emitBlink(BLINKER* me, uint16_t t);
/**
* Emit the blinkn event
* @param me the BLINKER itself
* @param t time to wait in ms before triggering event
*/void BLINKER_emitBlinkN(BLINKER* me, uint16_t t);
/**
* Emit the timer event
* @param me the BLINKER itself
* @param t time to wait in ms before triggering event
*/void BLINKER_emitTimer(BLINKER* me, uint16_t t);
/***********
* SETTERS *
***********/
/**
* Set the time on
* @param me the BLINKER itself
* @param v the value to set
*/
void BLINKER_setTimeOn(BLINKER* me, uint16_t v);
/**
* Set the time off
* @param me the BLINKER itself
* @param v the value to set
*/
void BLINKER_setTimeOff(BLINKER* me, uint16_t v);
/**
* Set the number of blink
* @param me the BLINKER itself
* @param v the value to set
*/
void BLINKER_setNumberOfBlink(BLINKER* me, uint8_t v);
/**
* Set the nBlinkIsOn
* @param me the BLINKER itself
* @param v the value to set
*/
void BLINKER_setNBlinkIsOn(BLINKER* me, bool v);
/**
* Set the remain blink(s)
* @param me the BLINKER itself
* @param v the value to set
*/
void BLINKER_setRemainBlinks(BLINKER* me, uint8_t v);
/**
* Stop to blink if it was indefinitely blinking
* @param me the blinker itself
*/
void BLINKER_endBlink(BLINKER* me);
#endif

View File

@ -146,13 +146,13 @@ void CAN_newMsg() {
CAN_receive(&canMsg);
data = canMsg.frame.id;
data = data<<12;
data = data | canMsg.frame.data0;
data = data<<8;
data = data | canMsg.frame.data1;
data = data | canMsg.frame.data3;
data = data<<8;
data = data | canMsg.frame.data2;
data = data<<8;
data = data | canMsg.frame.data3;
data = data | canMsg.frame.data1;
data = data<<8;
data = data | canMsg.frame.data0;
POST(&CAN_myself, &CAN_processEvent, evCAnewMsg, 0, data);
}

View File

@ -1,90 +0,0 @@
/**
* @author Rémi Heredero
* @version 1.0.0
* @date August 2023
* @file watchdog.c
*/
#include "watchdog.h"
void WATCHDOG_init(WATCHDOG* me){
me->state = STWD_INIT;
me->time = 10;
me->alive.f = NULL;
}
void WATCHDOG_startBehaviour(WATCHDOG* me){
POST(me, &WATCHDOG_processEvent, evWDinit, 0, 0);
}
bool WATCHDOG_processEvent(Event* ev) {
bool processed = false;
WATCHDOG* me = (WATCHDOG*)Event_getTarget(ev);
WATCHDOG_STATES oldState = me->state;
evIDT evid = Event_getId(ev);
uint64_t data = Event_getData(ev);
switch (me->state) { // onState
case STWD_INIT:
if (ev->id == evWDinit) {
me->state = STWD_ALIVE;
WATCHDOG_emitPoll(me, 10*me->time, 0);
}
break;
case STWD_ALIVE:
if (ev->id == evWDpoll) {
WATCHDOG_emitPoll(me, 10*me->time, 0);
if (me->alive.f != NULL) {
me->alive.f(me->alive.p);
}
}
break;
}
if(oldState != me->state){
switch (oldState) { // onExit
case STWD_INIT:
break;
case STWD_ALIVE:
break;
}
switch (me->state) { // onEntry
case STWD_INIT:
break;
case STWD_ALIVE:
break;
}
processed = true;
}
return processed;
}
/*************
* Callbacks *
*************/
void WATCHDOG_onAlive(WATCHDOG* me, WATCHDOG_CALLBACK_FUNCTION f, void* p) {
me->alive.f = f;
me->alive.p = p;
}
/************
* EMITTERS *
************/
void WATCHDOG_emitPoll(WATCHDOG* me, uint16_t t, int64_t data) {
POST(me, &WATCHDOG_processEvent, evWDpoll, t, data);
}
/***********
* SETTERS *
***********/
void WATCHDOG_setTime(WATCHDOG* me, uint8_t v) {
me->time = v;
}

View File

@ -1,83 +0,0 @@
/**
* @author Rémi Heredero
* @version 1.0.0
* @date August 2023
* @file watchdog.h
*/
#ifndef WATCHDOG_H
#define WATCHDOG_H
#include "../xf/xf.h"
typedef enum {
STWD_INIT,
STWD_ALIVE
} WATCHDOG_STATES;
typedef enum {
evWDinit = 20,
evWDpoll
} WATCHDOG_EVENTS;
typedef void (*WATCHDOG_CALLBACK_FUNCTION)(void*);
typedef struct {
WATCHDOG_CALLBACK_FUNCTION f; // function
void* p; // param(s)
} WATCHDOG_CALLBACK;
typedef struct {
WATCHDOG_STATES state;
uint8_t time;
WATCHDOG_CALLBACK alive;
} WATCHDOG;
/**
* Initialize the WATCHDOG
* @param me the WATCHDOG itself
*/
void WATCHDOG_init(WATCHDOG* me);
/**
* Start the WATCHDOG state machine
* @param me the WATCHDOG itself
*/
void WATCHDOG_startBehaviour(WATCHDOG* me);
/**
* Process the event
* @param ev the event to process
* @return true if the event is processed
*/
bool WATCHDOG_processEvent(Event* ev);
/*************
* Callbacks *
*************/
/**
* Set the callback function to call when the WATCHDOG is entering state alive
* @param me the WATCHDOG itself
* @param f the function to call
* @param p the param(s) to pass to the function
*/
void WATCHDOG_onAlive(WATCHDOG* me, WATCHDOG_CALLBACK_FUNCTION f, void* p);
/************
* EMITTERS *
************/
/**
* Emit the poll event
* @param me the WATCHDOG itself
* @param t time to wait in ms before triggering event
* @param data data to put on the event for XF
*/
void WATCHDOG_emitPoll(WATCHDOG* me, uint16_t t, int64_t data);
/***********
* SETTERS *
***********/
void WATCHDOG_setTime(WATCHDOG* me, uint8_t v);
#endif

View File

@ -0,0 +1,444 @@
#
# Generated Makefile - do not edit!
#
# Edit the Makefile in the project folder instead (../Makefile). Each target
# has a -pre and a -post target defined where you can add customized code.
#
# This makefile implements configuration specific macros and targets.
# Include project Makefile
ifeq "${IGNORE_LOCAL}" "TRUE"
# do not include local makefile. User is passing all local related variables already
else
include Makefile
# Include makefile containing local settings
ifeq "$(wildcard nbproject/Makefile-local-default.mk)" "nbproject/Makefile-local-default.mk"
include nbproject/Makefile-local-default.mk
endif
endif
# Environment
MKDIR=gnumkdir -p
RM=rm -f
MV=mv
CP=cp
# Macros
CND_CONF=default
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
IMAGE_TYPE=debug
OUTPUT_SUFFIX=elf
DEBUGGABLE_SUFFIX=elf
FINAL_IMAGE=${DISTDIR}/306-controller_interface.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
else
IMAGE_TYPE=production
OUTPUT_SUFFIX=hex
DEBUGGABLE_SUFFIX=elf
FINAL_IMAGE=${DISTDIR}/306-controller_interface.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
endif
ifeq ($(COMPARE_BUILD), true)
COMPARISON_BUILD=-mafrlcsj
else
COMPARISON_BUILD=
endif
# Object Directory
OBJECTDIR=build/${CND_CONF}/${IMAGE_TYPE}
# Distribution Directory
DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE}
# Source Files Quoted if spaced
SOURCEFILES_QUOTED_IF_SPACED=app/factory/factory.c app/can_message.c app/kartculator.c app/eeprom.c app/drive.c board/led/led.c mcc_generated_files/interrupt_manager.c mcc_generated_files/tmr0.c mcc_generated_files/pin_manager.c mcc_generated_files/device_config.c mcc_generated_files/mcc.c mcc_generated_files/ecan.c mcc_generated_files/memory.c middleware/can_interface.c middleware/alive.c middleware/blinker.c xf/event.c xf/xf.c main.c
# Object Files Quoted if spaced
OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/app/factory/factory.p1 ${OBJECTDIR}/app/can_message.p1 ${OBJECTDIR}/app/kartculator.p1 ${OBJECTDIR}/app/eeprom.p1 ${OBJECTDIR}/app/drive.p1 ${OBJECTDIR}/board/led/led.p1 ${OBJECTDIR}/mcc_generated_files/interrupt_manager.p1 ${OBJECTDIR}/mcc_generated_files/tmr0.p1 ${OBJECTDIR}/mcc_generated_files/pin_manager.p1 ${OBJECTDIR}/mcc_generated_files/device_config.p1 ${OBJECTDIR}/mcc_generated_files/mcc.p1 ${OBJECTDIR}/mcc_generated_files/ecan.p1 ${OBJECTDIR}/mcc_generated_files/memory.p1 ${OBJECTDIR}/middleware/can_interface.p1 ${OBJECTDIR}/middleware/alive.p1 ${OBJECTDIR}/middleware/blinker.p1 ${OBJECTDIR}/xf/event.p1 ${OBJECTDIR}/xf/xf.p1 ${OBJECTDIR}/main.p1
POSSIBLE_DEPFILES=${OBJECTDIR}/app/factory/factory.p1.d ${OBJECTDIR}/app/can_message.p1.d ${OBJECTDIR}/app/kartculator.p1.d ${OBJECTDIR}/app/eeprom.p1.d ${OBJECTDIR}/app/drive.p1.d ${OBJECTDIR}/board/led/led.p1.d ${OBJECTDIR}/mcc_generated_files/interrupt_manager.p1.d ${OBJECTDIR}/mcc_generated_files/tmr0.p1.d ${OBJECTDIR}/mcc_generated_files/pin_manager.p1.d ${OBJECTDIR}/mcc_generated_files/device_config.p1.d ${OBJECTDIR}/mcc_generated_files/mcc.p1.d ${OBJECTDIR}/mcc_generated_files/ecan.p1.d ${OBJECTDIR}/mcc_generated_files/memory.p1.d ${OBJECTDIR}/middleware/can_interface.p1.d ${OBJECTDIR}/middleware/alive.p1.d ${OBJECTDIR}/middleware/blinker.p1.d ${OBJECTDIR}/xf/event.p1.d ${OBJECTDIR}/xf/xf.p1.d ${OBJECTDIR}/main.p1.d
# Object Files
OBJECTFILES=${OBJECTDIR}/app/factory/factory.p1 ${OBJECTDIR}/app/can_message.p1 ${OBJECTDIR}/app/kartculator.p1 ${OBJECTDIR}/app/eeprom.p1 ${OBJECTDIR}/app/drive.p1 ${OBJECTDIR}/board/led/led.p1 ${OBJECTDIR}/mcc_generated_files/interrupt_manager.p1 ${OBJECTDIR}/mcc_generated_files/tmr0.p1 ${OBJECTDIR}/mcc_generated_files/pin_manager.p1 ${OBJECTDIR}/mcc_generated_files/device_config.p1 ${OBJECTDIR}/mcc_generated_files/mcc.p1 ${OBJECTDIR}/mcc_generated_files/ecan.p1 ${OBJECTDIR}/mcc_generated_files/memory.p1 ${OBJECTDIR}/middleware/can_interface.p1 ${OBJECTDIR}/middleware/alive.p1 ${OBJECTDIR}/middleware/blinker.p1 ${OBJECTDIR}/xf/event.p1 ${OBJECTDIR}/xf/xf.p1 ${OBJECTDIR}/main.p1
# Source Files
SOURCEFILES=app/factory/factory.c app/can_message.c app/kartculator.c app/eeprom.c app/drive.c board/led/led.c mcc_generated_files/interrupt_manager.c mcc_generated_files/tmr0.c mcc_generated_files/pin_manager.c mcc_generated_files/device_config.c mcc_generated_files/mcc.c mcc_generated_files/ecan.c mcc_generated_files/memory.c middleware/can_interface.c middleware/alive.c middleware/blinker.c xf/event.c xf/xf.c main.c
CFLAGS=
ASFLAGS=
LDLIBSOPTIONS=
############# Tool locations ##########################################
# If you copy a project from one host to another, the path where the #
# compiler is installed may be different. #
# If you open this project with MPLAB X in the new host, this #
# makefile will be regenerated and the paths will be corrected. #
#######################################################################
# fixDeps replaces a bunch of sed/cat/printf statements that slow down the build
FIXDEPS=fixDeps
.build-conf: ${BUILD_SUBPROJECTS}
ifneq ($(INFORMATION_MESSAGE), )
@echo $(INFORMATION_MESSAGE)
endif
${MAKE} -f nbproject/Makefile-default.mk ${DISTDIR}/306-controller_interface.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
MP_PROCESSOR_OPTION=18F26K83
# ------------------------------------------------------------------------------------
# Rules for buildStep: compile
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
${OBJECTDIR}/app/factory/factory.p1: app/factory/factory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/app/factory"
@${RM} ${OBJECTDIR}/app/factory/factory.p1.d
@${RM} ${OBJECTDIR}/app/factory/factory.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -mdebugger=pickit3 -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/app/factory/factory.p1 app/factory/factory.c
@-${MV} ${OBJECTDIR}/app/factory/factory.d ${OBJECTDIR}/app/factory/factory.p1.d
@${FIXDEPS} ${OBJECTDIR}/app/factory/factory.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/app/can_message.p1: app/can_message.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/app"
@${RM} ${OBJECTDIR}/app/can_message.p1.d
@${RM} ${OBJECTDIR}/app/can_message.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -mdebugger=pickit3 -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/app/can_message.p1 app/can_message.c
@-${MV} ${OBJECTDIR}/app/can_message.d ${OBJECTDIR}/app/can_message.p1.d
@${FIXDEPS} ${OBJECTDIR}/app/can_message.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/app/kartculator.p1: app/kartculator.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/app"
@${RM} ${OBJECTDIR}/app/kartculator.p1.d
@${RM} ${OBJECTDIR}/app/kartculator.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -mdebugger=pickit3 -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/app/kartculator.p1 app/kartculator.c
@-${MV} ${OBJECTDIR}/app/kartculator.d ${OBJECTDIR}/app/kartculator.p1.d
@${FIXDEPS} ${OBJECTDIR}/app/kartculator.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/app/eeprom.p1: app/eeprom.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/app"
@${RM} ${OBJECTDIR}/app/eeprom.p1.d
@${RM} ${OBJECTDIR}/app/eeprom.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -mdebugger=pickit3 -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/app/eeprom.p1 app/eeprom.c
@-${MV} ${OBJECTDIR}/app/eeprom.d ${OBJECTDIR}/app/eeprom.p1.d
@${FIXDEPS} ${OBJECTDIR}/app/eeprom.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/app/drive.p1: app/drive.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/app"
@${RM} ${OBJECTDIR}/app/drive.p1.d
@${RM} ${OBJECTDIR}/app/drive.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -mdebugger=pickit3 -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/app/drive.p1 app/drive.c
@-${MV} ${OBJECTDIR}/app/drive.d ${OBJECTDIR}/app/drive.p1.d
@${FIXDEPS} ${OBJECTDIR}/app/drive.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/board/led/led.p1: board/led/led.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/board/led"
@${RM} ${OBJECTDIR}/board/led/led.p1.d
@${RM} ${OBJECTDIR}/board/led/led.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -mdebugger=pickit3 -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/board/led/led.p1 board/led/led.c
@-${MV} ${OBJECTDIR}/board/led/led.d ${OBJECTDIR}/board/led/led.p1.d
@${FIXDEPS} ${OBJECTDIR}/board/led/led.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/mcc_generated_files/interrupt_manager.p1: mcc_generated_files/interrupt_manager.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/mcc_generated_files"
@${RM} ${OBJECTDIR}/mcc_generated_files/interrupt_manager.p1.d
@${RM} ${OBJECTDIR}/mcc_generated_files/interrupt_manager.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -mdebugger=pickit3 -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/mcc_generated_files/interrupt_manager.p1 mcc_generated_files/interrupt_manager.c
@-${MV} ${OBJECTDIR}/mcc_generated_files/interrupt_manager.d ${OBJECTDIR}/mcc_generated_files/interrupt_manager.p1.d
@${FIXDEPS} ${OBJECTDIR}/mcc_generated_files/interrupt_manager.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/mcc_generated_files/tmr0.p1: mcc_generated_files/tmr0.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/mcc_generated_files"
@${RM} ${OBJECTDIR}/mcc_generated_files/tmr0.p1.d
@${RM} ${OBJECTDIR}/mcc_generated_files/tmr0.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -mdebugger=pickit3 -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/mcc_generated_files/tmr0.p1 mcc_generated_files/tmr0.c
@-${MV} ${OBJECTDIR}/mcc_generated_files/tmr0.d ${OBJECTDIR}/mcc_generated_files/tmr0.p1.d
@${FIXDEPS} ${OBJECTDIR}/mcc_generated_files/tmr0.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/mcc_generated_files/pin_manager.p1: mcc_generated_files/pin_manager.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/mcc_generated_files"
@${RM} ${OBJECTDIR}/mcc_generated_files/pin_manager.p1.d
@${RM} ${OBJECTDIR}/mcc_generated_files/pin_manager.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -mdebugger=pickit3 -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/mcc_generated_files/pin_manager.p1 mcc_generated_files/pin_manager.c
@-${MV} ${OBJECTDIR}/mcc_generated_files/pin_manager.d ${OBJECTDIR}/mcc_generated_files/pin_manager.p1.d
@${FIXDEPS} ${OBJECTDIR}/mcc_generated_files/pin_manager.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/mcc_generated_files/device_config.p1: mcc_generated_files/device_config.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/mcc_generated_files"
@${RM} ${OBJECTDIR}/mcc_generated_files/device_config.p1.d
@${RM} ${OBJECTDIR}/mcc_generated_files/device_config.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -mdebugger=pickit3 -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/mcc_generated_files/device_config.p1 mcc_generated_files/device_config.c
@-${MV} ${OBJECTDIR}/mcc_generated_files/device_config.d ${OBJECTDIR}/mcc_generated_files/device_config.p1.d
@${FIXDEPS} ${OBJECTDIR}/mcc_generated_files/device_config.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/mcc_generated_files/mcc.p1: mcc_generated_files/mcc.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/mcc_generated_files"
@${RM} ${OBJECTDIR}/mcc_generated_files/mcc.p1.d
@${RM} ${OBJECTDIR}/mcc_generated_files/mcc.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -mdebugger=pickit3 -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/mcc_generated_files/mcc.p1 mcc_generated_files/mcc.c
@-${MV} ${OBJECTDIR}/mcc_generated_files/mcc.d ${OBJECTDIR}/mcc_generated_files/mcc.p1.d
@${FIXDEPS} ${OBJECTDIR}/mcc_generated_files/mcc.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/mcc_generated_files/ecan.p1: mcc_generated_files/ecan.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/mcc_generated_files"
@${RM} ${OBJECTDIR}/mcc_generated_files/ecan.p1.d
@${RM} ${OBJECTDIR}/mcc_generated_files/ecan.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -mdebugger=pickit3 -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/mcc_generated_files/ecan.p1 mcc_generated_files/ecan.c
@-${MV} ${OBJECTDIR}/mcc_generated_files/ecan.d ${OBJECTDIR}/mcc_generated_files/ecan.p1.d
@${FIXDEPS} ${OBJECTDIR}/mcc_generated_files/ecan.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/mcc_generated_files/memory.p1: mcc_generated_files/memory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/mcc_generated_files"
@${RM} ${OBJECTDIR}/mcc_generated_files/memory.p1.d
@${RM} ${OBJECTDIR}/mcc_generated_files/memory.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -mdebugger=pickit3 -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/mcc_generated_files/memory.p1 mcc_generated_files/memory.c
@-${MV} ${OBJECTDIR}/mcc_generated_files/memory.d ${OBJECTDIR}/mcc_generated_files/memory.p1.d
@${FIXDEPS} ${OBJECTDIR}/mcc_generated_files/memory.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/middleware/can_interface.p1: middleware/can_interface.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/middleware"
@${RM} ${OBJECTDIR}/middleware/can_interface.p1.d
@${RM} ${OBJECTDIR}/middleware/can_interface.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -mdebugger=pickit3 -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/middleware/can_interface.p1 middleware/can_interface.c
@-${MV} ${OBJECTDIR}/middleware/can_interface.d ${OBJECTDIR}/middleware/can_interface.p1.d
@${FIXDEPS} ${OBJECTDIR}/middleware/can_interface.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/middleware/alive.p1: middleware/alive.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/middleware"
@${RM} ${OBJECTDIR}/middleware/alive.p1.d
@${RM} ${OBJECTDIR}/middleware/alive.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -mdebugger=pickit3 -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/middleware/alive.p1 middleware/alive.c
@-${MV} ${OBJECTDIR}/middleware/alive.d ${OBJECTDIR}/middleware/alive.p1.d
@${FIXDEPS} ${OBJECTDIR}/middleware/alive.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/middleware/blinker.p1: middleware/blinker.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/middleware"
@${RM} ${OBJECTDIR}/middleware/blinker.p1.d
@${RM} ${OBJECTDIR}/middleware/blinker.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -mdebugger=pickit3 -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/middleware/blinker.p1 middleware/blinker.c
@-${MV} ${OBJECTDIR}/middleware/blinker.d ${OBJECTDIR}/middleware/blinker.p1.d
@${FIXDEPS} ${OBJECTDIR}/middleware/blinker.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/xf/event.p1: xf/event.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/xf"
@${RM} ${OBJECTDIR}/xf/event.p1.d
@${RM} ${OBJECTDIR}/xf/event.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -mdebugger=pickit3 -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/xf/event.p1 xf/event.c
@-${MV} ${OBJECTDIR}/xf/event.d ${OBJECTDIR}/xf/event.p1.d
@${FIXDEPS} ${OBJECTDIR}/xf/event.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/xf/xf.p1: xf/xf.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/xf"
@${RM} ${OBJECTDIR}/xf/xf.p1.d
@${RM} ${OBJECTDIR}/xf/xf.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -mdebugger=pickit3 -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/xf/xf.p1 xf/xf.c
@-${MV} ${OBJECTDIR}/xf/xf.d ${OBJECTDIR}/xf/xf.p1.d
@${FIXDEPS} ${OBJECTDIR}/xf/xf.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/main.p1: main.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}"
@${RM} ${OBJECTDIR}/main.p1.d
@${RM} ${OBJECTDIR}/main.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -mdebugger=pickit3 -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/main.p1 main.c
@-${MV} ${OBJECTDIR}/main.d ${OBJECTDIR}/main.p1.d
@${FIXDEPS} ${OBJECTDIR}/main.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
else
${OBJECTDIR}/app/factory/factory.p1: app/factory/factory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/app/factory"
@${RM} ${OBJECTDIR}/app/factory/factory.p1.d
@${RM} ${OBJECTDIR}/app/factory/factory.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/app/factory/factory.p1 app/factory/factory.c
@-${MV} ${OBJECTDIR}/app/factory/factory.d ${OBJECTDIR}/app/factory/factory.p1.d
@${FIXDEPS} ${OBJECTDIR}/app/factory/factory.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/app/can_message.p1: app/can_message.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/app"
@${RM} ${OBJECTDIR}/app/can_message.p1.d
@${RM} ${OBJECTDIR}/app/can_message.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/app/can_message.p1 app/can_message.c
@-${MV} ${OBJECTDIR}/app/can_message.d ${OBJECTDIR}/app/can_message.p1.d
@${FIXDEPS} ${OBJECTDIR}/app/can_message.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/app/kartculator.p1: app/kartculator.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/app"
@${RM} ${OBJECTDIR}/app/kartculator.p1.d
@${RM} ${OBJECTDIR}/app/kartculator.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/app/kartculator.p1 app/kartculator.c
@-${MV} ${OBJECTDIR}/app/kartculator.d ${OBJECTDIR}/app/kartculator.p1.d
@${FIXDEPS} ${OBJECTDIR}/app/kartculator.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/app/eeprom.p1: app/eeprom.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/app"
@${RM} ${OBJECTDIR}/app/eeprom.p1.d
@${RM} ${OBJECTDIR}/app/eeprom.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/app/eeprom.p1 app/eeprom.c
@-${MV} ${OBJECTDIR}/app/eeprom.d ${OBJECTDIR}/app/eeprom.p1.d
@${FIXDEPS} ${OBJECTDIR}/app/eeprom.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/app/drive.p1: app/drive.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/app"
@${RM} ${OBJECTDIR}/app/drive.p1.d
@${RM} ${OBJECTDIR}/app/drive.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/app/drive.p1 app/drive.c
@-${MV} ${OBJECTDIR}/app/drive.d ${OBJECTDIR}/app/drive.p1.d
@${FIXDEPS} ${OBJECTDIR}/app/drive.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/board/led/led.p1: board/led/led.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/board/led"
@${RM} ${OBJECTDIR}/board/led/led.p1.d
@${RM} ${OBJECTDIR}/board/led/led.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/board/led/led.p1 board/led/led.c
@-${MV} ${OBJECTDIR}/board/led/led.d ${OBJECTDIR}/board/led/led.p1.d
@${FIXDEPS} ${OBJECTDIR}/board/led/led.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/mcc_generated_files/interrupt_manager.p1: mcc_generated_files/interrupt_manager.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/mcc_generated_files"
@${RM} ${OBJECTDIR}/mcc_generated_files/interrupt_manager.p1.d
@${RM} ${OBJECTDIR}/mcc_generated_files/interrupt_manager.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/mcc_generated_files/interrupt_manager.p1 mcc_generated_files/interrupt_manager.c
@-${MV} ${OBJECTDIR}/mcc_generated_files/interrupt_manager.d ${OBJECTDIR}/mcc_generated_files/interrupt_manager.p1.d
@${FIXDEPS} ${OBJECTDIR}/mcc_generated_files/interrupt_manager.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/mcc_generated_files/tmr0.p1: mcc_generated_files/tmr0.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/mcc_generated_files"
@${RM} ${OBJECTDIR}/mcc_generated_files/tmr0.p1.d
@${RM} ${OBJECTDIR}/mcc_generated_files/tmr0.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/mcc_generated_files/tmr0.p1 mcc_generated_files/tmr0.c
@-${MV} ${OBJECTDIR}/mcc_generated_files/tmr0.d ${OBJECTDIR}/mcc_generated_files/tmr0.p1.d
@${FIXDEPS} ${OBJECTDIR}/mcc_generated_files/tmr0.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/mcc_generated_files/pin_manager.p1: mcc_generated_files/pin_manager.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/mcc_generated_files"
@${RM} ${OBJECTDIR}/mcc_generated_files/pin_manager.p1.d
@${RM} ${OBJECTDIR}/mcc_generated_files/pin_manager.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/mcc_generated_files/pin_manager.p1 mcc_generated_files/pin_manager.c
@-${MV} ${OBJECTDIR}/mcc_generated_files/pin_manager.d ${OBJECTDIR}/mcc_generated_files/pin_manager.p1.d
@${FIXDEPS} ${OBJECTDIR}/mcc_generated_files/pin_manager.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/mcc_generated_files/device_config.p1: mcc_generated_files/device_config.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/mcc_generated_files"
@${RM} ${OBJECTDIR}/mcc_generated_files/device_config.p1.d
@${RM} ${OBJECTDIR}/mcc_generated_files/device_config.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/mcc_generated_files/device_config.p1 mcc_generated_files/device_config.c
@-${MV} ${OBJECTDIR}/mcc_generated_files/device_config.d ${OBJECTDIR}/mcc_generated_files/device_config.p1.d
@${FIXDEPS} ${OBJECTDIR}/mcc_generated_files/device_config.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/mcc_generated_files/mcc.p1: mcc_generated_files/mcc.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/mcc_generated_files"
@${RM} ${OBJECTDIR}/mcc_generated_files/mcc.p1.d
@${RM} ${OBJECTDIR}/mcc_generated_files/mcc.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/mcc_generated_files/mcc.p1 mcc_generated_files/mcc.c
@-${MV} ${OBJECTDIR}/mcc_generated_files/mcc.d ${OBJECTDIR}/mcc_generated_files/mcc.p1.d
@${FIXDEPS} ${OBJECTDIR}/mcc_generated_files/mcc.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/mcc_generated_files/ecan.p1: mcc_generated_files/ecan.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/mcc_generated_files"
@${RM} ${OBJECTDIR}/mcc_generated_files/ecan.p1.d
@${RM} ${OBJECTDIR}/mcc_generated_files/ecan.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/mcc_generated_files/ecan.p1 mcc_generated_files/ecan.c
@-${MV} ${OBJECTDIR}/mcc_generated_files/ecan.d ${OBJECTDIR}/mcc_generated_files/ecan.p1.d
@${FIXDEPS} ${OBJECTDIR}/mcc_generated_files/ecan.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/mcc_generated_files/memory.p1: mcc_generated_files/memory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/mcc_generated_files"
@${RM} ${OBJECTDIR}/mcc_generated_files/memory.p1.d
@${RM} ${OBJECTDIR}/mcc_generated_files/memory.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/mcc_generated_files/memory.p1 mcc_generated_files/memory.c
@-${MV} ${OBJECTDIR}/mcc_generated_files/memory.d ${OBJECTDIR}/mcc_generated_files/memory.p1.d
@${FIXDEPS} ${OBJECTDIR}/mcc_generated_files/memory.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/middleware/can_interface.p1: middleware/can_interface.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/middleware"
@${RM} ${OBJECTDIR}/middleware/can_interface.p1.d
@${RM} ${OBJECTDIR}/middleware/can_interface.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/middleware/can_interface.p1 middleware/can_interface.c
@-${MV} ${OBJECTDIR}/middleware/can_interface.d ${OBJECTDIR}/middleware/can_interface.p1.d
@${FIXDEPS} ${OBJECTDIR}/middleware/can_interface.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/middleware/alive.p1: middleware/alive.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/middleware"
@${RM} ${OBJECTDIR}/middleware/alive.p1.d
@${RM} ${OBJECTDIR}/middleware/alive.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/middleware/alive.p1 middleware/alive.c
@-${MV} ${OBJECTDIR}/middleware/alive.d ${OBJECTDIR}/middleware/alive.p1.d
@${FIXDEPS} ${OBJECTDIR}/middleware/alive.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/middleware/blinker.p1: middleware/blinker.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/middleware"
@${RM} ${OBJECTDIR}/middleware/blinker.p1.d
@${RM} ${OBJECTDIR}/middleware/blinker.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/middleware/blinker.p1 middleware/blinker.c
@-${MV} ${OBJECTDIR}/middleware/blinker.d ${OBJECTDIR}/middleware/blinker.p1.d
@${FIXDEPS} ${OBJECTDIR}/middleware/blinker.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/xf/event.p1: xf/event.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/xf"
@${RM} ${OBJECTDIR}/xf/event.p1.d
@${RM} ${OBJECTDIR}/xf/event.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/xf/event.p1 xf/event.c
@-${MV} ${OBJECTDIR}/xf/event.d ${OBJECTDIR}/xf/event.p1.d
@${FIXDEPS} ${OBJECTDIR}/xf/event.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/xf/xf.p1: xf/xf.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/xf"
@${RM} ${OBJECTDIR}/xf/xf.p1.d
@${RM} ${OBJECTDIR}/xf/xf.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/xf/xf.p1 xf/xf.c
@-${MV} ${OBJECTDIR}/xf/xf.d ${OBJECTDIR}/xf/xf.p1.d
@${FIXDEPS} ${OBJECTDIR}/xf/xf.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/main.p1: main.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}"
@${RM} ${OBJECTDIR}/main.p1.d
@${RM} ${OBJECTDIR}/main.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o ${OBJECTDIR}/main.p1 main.c
@-${MV} ${OBJECTDIR}/main.d ${OBJECTDIR}/main.p1.d
@${FIXDEPS} ${OBJECTDIR}/main.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
endif
# ------------------------------------------------------------------------------------
# Rules for buildStep: assemble
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
else
endif
# ------------------------------------------------------------------------------------
# Rules for buildStep: assembleWithPreprocess
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
else
endif
# ------------------------------------------------------------------------------------
# Rules for buildStep: link
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
${DISTDIR}/306-controller_interface.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${DISTDIR}
${MP_CC} $(MP_EXTRA_LD_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -Wl,-Map=${DISTDIR}/306-controller_interface.X.${IMAGE_TYPE}.map -D__DEBUG=1 -mdebugger=pickit3 -DXPRJ_default=$(CND_CONF) -Wl,--defsym=__MPLAB_BUILD=1 -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto $(COMPARISON_BUILD) -Wl,--memorysummary,${DISTDIR}/memoryfile.xml -o ${DISTDIR}/306-controller_interface.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED}
@${RM} ${DISTDIR}/306-controller_interface.X.${IMAGE_TYPE}.hex
else
${DISTDIR}/306-controller_interface.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${DISTDIR}
${MP_CC} $(MP_EXTRA_LD_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -Wl,-Map=${DISTDIR}/306-controller_interface.X.${IMAGE_TYPE}.map -DXPRJ_default=$(CND_CONF) -Wl,--defsym=__MPLAB_BUILD=1 -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=3 -Wa,-a -msummary=-psect,-class,+mem,-hex,-file -ginhx32 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto $(COMPARISON_BUILD) -Wl,--memorysummary,${DISTDIR}/memoryfile.xml -o ${DISTDIR}/306-controller_interface.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED}
endif
# Subprojects
.build-subprojects:
# Subprojects
.clean-subprojects:
# Clean Targets
.clean-conf: ${CLEAN_SUBPROJECTS}
${RM} -r ${OBJECTDIR}
${RM} -r ${DISTDIR}
# Enable dependency checking
.dep.inc: .depcheck-impl
DEPFILES=$(wildcard ${POSSIBLE_DEPFILES})
ifneq (${DEPFILES},)
include ${DEPFILES}
endif

View File

@ -0,0 +1,69 @@
#
# Generated Makefile - do not edit!
#
# Edit the Makefile in the project folder instead (../Makefile). Each target
# has a pre- and a post- target defined where you can add customization code.
#
# This makefile implements macros and targets common to all configurations.
#
# NOCDDL
# Building and Cleaning subprojects are done by default, but can be controlled with the SUB
# macro. If SUB=no, subprojects will not be built or cleaned. The following macro
# statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf
# and .clean-reqprojects-conf unless SUB has the value 'no'
SUB_no=NO
SUBPROJECTS=${SUB_${SUB}}
BUILD_SUBPROJECTS_=.build-subprojects
BUILD_SUBPROJECTS_NO=
BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}}
CLEAN_SUBPROJECTS_=.clean-subprojects
CLEAN_SUBPROJECTS_NO=
CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}}
# Project Name
PROJECTNAME=306-controller_interface.X
# Active Configuration
DEFAULTCONF=default
CONF=${DEFAULTCONF}
# All Configurations
ALLCONFS=default
# build
.build-impl: .build-pre
${MAKE} -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-conf
# clean
.clean-impl: .clean-pre
${MAKE} -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .clean-conf
# clobber
.clobber-impl: .clobber-pre .depcheck-impl
${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=default clean
# all
.all-impl: .all-pre .depcheck-impl
${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=default build
# dependency checking support
.depcheck-impl:
# @echo "# This code depends on make tool being used" >.dep.inc
# @if [ -n "${MAKE_VERSION}" ]; then \
# echo "DEPFILES=\$$(wildcard \$$(addsuffix .d, \$${OBJECTFILES}))" >>.dep.inc; \
# echo "ifneq (\$${DEPFILES},)" >>.dep.inc; \
# echo "include \$${DEPFILES}" >>.dep.inc; \
# echo "endif" >>.dep.inc; \
# else \
# echo ".KEEP_STATE:" >>.dep.inc; \
# echo ".KEEP_STATE_FILE:.make.state.\$${CONF}" >>.dep.inc; \
# fi

View File

@ -0,0 +1,37 @@
#
# Generated Makefile - do not edit!
#
#
# This file contains information about the location of compilers and other tools.
# If you commmit this file into your revision control server, you will be able to
# to checkout the project and build it from the command line with make. However,
# if more than one person works on the same project, then this file might show
# conflicts since different users are bound to have compilers in different places.
# In that case you might choose to not commit this file and let MPLAB X recreate this file
# for each user. The disadvantage of not commiting this file is that you must run MPLAB X at
# least once so the file gets created and the project can be built. Finally, you can also
# avoid using this file at all if you are only building from the command line with make.
# You can invoke make with the values of the macros:
# $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ...
#
SHELL=cmd.exe
PATH_TO_IDE_BIN=C:/Program Files/Microchip/MPLABX/v6.15/mplab_platform/platform/../mplab_ide/modules/../../bin/
# Adding MPLAB X bin directory to path.
PATH:=C:/Program Files/Microchip/MPLABX/v6.15/mplab_platform/platform/../mplab_ide/modules/../../bin/:$(PATH)
# Path to java used to run MPLAB X when this makefile was created
MP_JAVA_PATH="C:\Program Files\Microchip\MPLABX\v6.15\sys\java\zulu8.64.0.19-ca-fx-jre8.0.345-win_x64/bin/"
OS_CURRENT="$(shell uname -s)"
MP_CC="C:\Program Files\Microchip\xc8\v2.41\bin\xc8-cc.exe"
# MP_CPPC is not defined
# MP_BC is not defined
MP_AS="C:\Program Files\Microchip\xc8\v2.41\bin\xc8-cc.exe"
MP_LD="C:\Program Files\Microchip\xc8\v2.41\bin\xc8-cc.exe"
MP_AR="C:\Program Files\Microchip\xc8\v2.41\bin\xc8-ar.exe"
DEP_GEN=${MP_JAVA_PATH}java -jar "C:/Program Files/Microchip/MPLABX/v6.15/mplab_platform/platform/../mplab_ide/modules/../../bin/extractobjectdependencies.jar"
MP_CC_DIR="C:\Program Files\Microchip\xc8\v2.41\bin"
# MP_CPPC_DIR is not defined
# MP_BC_DIR is not defined
MP_AS_DIR="C:\Program Files\Microchip\xc8\v2.41\bin"
MP_LD_DIR="C:\Program Files\Microchip\xc8\v2.41\bin"
MP_AR_DIR="C:\Program Files\Microchip\xc8\v2.41\bin"
DFP_DIR=C:/Users/remi.heredero/.mchp_packs/Microchip/PIC18F-K_DFP/1.7.134

View File

@ -0,0 +1,10 @@
#
# Generated - do not edit!
#
# NOCDDL
#
CND_BASEDIR=`pwd`
# default configuration
CND_ARTIFACT_DIR_default=dist/default/production
CND_ARTIFACT_NAME_default=306-controller_interface.X.production.hex
CND_ARTIFACT_PATH_default=dist/default/production/306-controller_interface.X.production.hex

View File

@ -8,6 +8,9 @@
<itemPath>app/factory/factory.h</itemPath>
<itemPath>app/car.h</itemPath>
<itemPath>app/can_message.h</itemPath>
<itemPath>app/kartculator.h</itemPath>
<itemPath>app/eeprom.h</itemPath>
<itemPath>app/drive.h</itemPath>
</logicalFolder>
<logicalFolder name="board" displayName="board" projectFiles="true">
<itemPath>board/led/led.h</itemPath>
@ -25,8 +28,8 @@
</logicalFolder>
<logicalFolder name="middleware" displayName="middleware" projectFiles="true">
<itemPath>middleware/can_interface.h</itemPath>
<itemPath>middleware/alive_checker.h</itemPath>
<itemPath>middleware/watchdog.h</itemPath>
<itemPath>middleware/alive.h</itemPath>
<itemPath>middleware/blinker.h</itemPath>
</logicalFolder>
<logicalFolder name="xf" displayName="xf" projectFiles="true">
<itemPath>xf/event.h</itemPath>
@ -44,6 +47,9 @@
<logicalFolder name="app" displayName="app" projectFiles="true">
<itemPath>app/factory/factory.c</itemPath>
<itemPath>app/can_message.c</itemPath>
<itemPath>app/kartculator.c</itemPath>
<itemPath>app/eeprom.c</itemPath>
<itemPath>app/drive.c</itemPath>
</logicalFolder>
<logicalFolder name="board" displayName="board" projectFiles="true">
<itemPath>board/led/led.c</itemPath>
@ -61,8 +67,8 @@
</logicalFolder>
<logicalFolder name="middleware" displayName="middleware" projectFiles="true">
<itemPath>middleware/can_interface.c</itemPath>
<itemPath>middleware/alive_checker.c</itemPath>
<itemPath>middleware/watchdog.c</itemPath>
<itemPath>middleware/alive.c</itemPath>
<itemPath>middleware/blinker.c</itemPath>
</logicalFolder>
<logicalFolder name="xf" displayName="xf" projectFiles="true">
<itemPath>xf/event.c</itemPath>
@ -86,7 +92,7 @@
<conf name="default" type="2">
<toolsSet>
<developmentServer>localhost</developmentServer>
<targetDevice>PIC18F25K83</targetDevice>
<targetDevice>PIC18F26K83</targetDevice>
<targetHeader></targetHeader>
<targetPluginBoard></targetPluginBoard>
<platformTool>PICkit3PlatformTool</platformTool>
@ -214,7 +220,10 @@
<property key="debugoptions.debug-startup" value="Use system settings"/>
<property key="debugoptions.reset-behaviour" value="Use system settings"/>
<property key="debugoptions.useswbreakpoints" value="false"/>
<property key="event.recorder.enabled" value="false"/>
<property key="event.recorder.scvd.files" value=""/>
<property key="hwtoolclock.frcindebug" value="false"/>
<property key="lastid" value=""/>
<property key="memories.aux" value="false"/>
<property key="memories.bootflash" value="true"/>
<property key="memories.configurationmemory" value="true"/>
@ -236,7 +245,7 @@
<property key="programoptions.preservedataflash" value="false"/>
<property key="programoptions.preservedataflash.ranges"
value="${programoptions.preservedataflash.ranges}"/>
<property key="programoptions.preserveeeprom" value="false"/>
<property key="programoptions.preserveeeprom" value="true"/>
<property key="programoptions.preserveeeprom.ranges" value="310000-3103ff"/>
<property key="programoptions.preserveprogram.ranges" value=""/>
<property key="programoptions.preserveprogramrange" value="false"/>
@ -244,7 +253,7 @@
<property key="programoptions.programcalmem" value="false"/>
<property key="programoptions.programuserotp" value="false"/>
<property key="programoptions.testmodeentrymethod" value="VDDFirst"/>
<property key="programoptions.usehighvoltageonmclr" value="true"/>
<property key="programoptions.usehighvoltageonmclr" value="false"/>
<property key="programoptions.uselvpprogramming" value="false"/>
<property key="voltagevalue" value="5.0"/>
</PICkit3PlatformTool>
@ -258,8 +267,10 @@
<property key="debugoptions.debug-startup" value="Use system settings"/>
<property key="debugoptions.reset-behaviour" value="Use system settings"/>
<property key="debugoptions.useswbreakpoints" value="false"/>
<property key="firmware.download.all" value="false"/>
<property key="event.recorder.enabled" value="false"/>
<property key="event.recorder.scvd.files" value=""/>
<property key="hwtoolclock.frcindebug" value="false"/>
<property key="lastid" value=""/>
<property key="memories.aux" value="false"/>
<property key="memories.bootflash" value="true"/>
<property key="memories.configurationmemory" value="true"/>
@ -281,7 +292,7 @@
<property key="programoptions.preservedataflash" value="false"/>
<property key="programoptions.preservedataflash.ranges"
value="${programoptions.preservedataflash.ranges}"/>
<property key="programoptions.preserveeeprom" value="false"/>
<property key="programoptions.preserveeeprom" value="true"/>
<property key="programoptions.preserveeeprom.ranges" value="310000-3103ff"/>
<property key="programoptions.preserveprogram.ranges" value=""/>
<property key="programoptions.preserveprogramrange" value="false"/>
@ -289,7 +300,7 @@
<property key="programoptions.programcalmem" value="false"/>
<property key="programoptions.programuserotp" value="false"/>
<property key="programoptions.testmodeentrymethod" value="VDDFirst"/>
<property key="programoptions.usehighvoltageonmclr" value="true"/>
<property key="programoptions.usehighvoltageonmclr" value="false"/>
<property key="programoptions.uselvpprogramming" value="false"/>
<property key="voltagevalue" value="5.0"/>
</Tool>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -27,8 +27,8 @@ typedef struct Timer_ // timer structure
/*----------------------------------------------------------------------------*/
/* depending on usage, change MAXTIMER and MAXEVENT */
/*----------------------------------------------------------------------------*/
#define MAXTIMER 8 // number of timers in our system
#define MAXEVENT 12 // number of events in our system
#define MAXTIMER 15 // number of timers in our system
#define MAXEVENT 20 // number of events in our system
#define NULLTIMER 0 // no value for time
#define TICKINTERVAL 10 // this is the ticktimers duration

BIN
UML/alive.pdf Normal file

Binary file not shown.

View File

@ -4,10 +4,10 @@
<element>
<id>UMLSpecialState</id>
<coordinates>
<x>266</x>
<y>98</y>
<w>28</w>
<h>28</h>
<x>714</x>
<y>28</y>
<w>56</w>
<h>56</h>
</coordinates>
<panel_attributes>type=initial</panel_attributes>
<additional_attributes/>
@ -15,164 +15,257 @@
<element>
<id>Relation</id>
<coordinates>
<x>266</x>
<y>112</y>
<w>112</w>
<h>98</h>
<x>462</x>
<y>70</y>
<w>308</w>
<h>154</h>
</coordinates>
<panel_attributes>lt=-&gt;
evACinit</panel_attributes>
<additional_attributes>10.0;10.0;10.0;50.0</additional_attributes>
evInitChecker</panel_attributes>
<additional_attributes>200.0;10.0;200.0;50.0;10.0;50.0;10.0;90.0</additional_attributes>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>210</x>
<y>182</y>
<w>140</w>
<h>56</h>
<x>350</x>
<y>196</y>
<w>266</w>
<h>112</h>
</coordinates>
<panel_attributes>STAC_SETUP</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLNote</id>
<coordinates>
<x>434</x>
<y>182</y>
<w>140</w>
<h>42</h>
</coordinates>
<panel_attributes>Send params</panel_attributes>
<panel_attributes>SETUP
--
/entry: sendParamsOnCan
/entry: checker = true</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>266</x>
<y>224</y>
<w>126</w>
<x>462</x>
<y>294</y>
<w>98</w>
<h>98</h>
</coordinates>
<panel_attributes>lt=-&gt;
evACborn</panel_attributes>
m1=evBorn</panel_attributes>
<additional_attributes>10.0;10.0;10.0;50.0</additional_attributes>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>210</x>
<y>294</y>
<w>140</w>
<h>56</h>
</coordinates>
<panel_attributes>STAC_BORN</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>168</x>
<y>406</y>
<w>224</w>
<x>350</x>
<y>364</y>
<w>266</w>
<h>84</h>
</coordinates>
<panel_attributes>STAC_WAIT
<panel_attributes>BORN
--
/entry: isAlive = false</panel_attributes>
/entry: init</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>350</x>
<y>504</y>
<w>266</w>
<h>112</h>
</coordinates>
<panel_attributes>WAIT
--
/entry: start children class
--
isAlive = false</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>266</x>
<y>336</y>
<w>140</w>
<x>462</x>
<y>434</y>
<w>112</w>
<h>98</h>
</coordinates>
<panel_attributes>lt=-&gt;
evACready</panel_attributes>
m1=evReady</panel_attributes>
<additional_attributes>10.0;10.0;10.0;50.0</additional_attributes>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>210</x>
<y>658</y>
<w>140</w>
<h>56</h>
<x>350</x>
<y>784</y>
<w>266</w>
<h>84</h>
</coordinates>
<panel_attributes>STAC_DEAD</panel_attributes>
<panel_attributes>DEAD
--
</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>266</x>
<y>476</y>
<w>112</w>
<h>98</h>
</coordinates>
<panel_attributes>lt=-&gt;
evACpoll</panel_attributes>
<additional_attributes>10.0;10.0;10.0;50.0</additional_attributes>
</element>
<element>
<id>UMLSpecialState</id>
<coordinates>
<x>252</x>
<x>280</x>
<y>546</y>
<w>56</w>
<h>56</h>
<w>210</w>
<h>182</h>
</coordinates>
<panel_attributes>type=decision</panel_attributes>
<additional_attributes/>
<panel_attributes>lt=-&gt;
m1=evPoll\n[isAlive]</panel_attributes>
<additional_attributes>80.0;50.0;80.0;110.0;10.0;110.0;10.0;10.0;50.0;10.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>266</x>
<y>588</y>
<w>84</w>
<h>98</h>
<x>224</x>
<y>252</y>
<w>378</w>
<h>700</h>
</coordinates>
<panel_attributes>lt=-&gt;
m1=[else]</panel_attributes>
<additional_attributes>10.0;10.0;10.0;50.0</additional_attributes>
m1=evResurrect</panel_attributes>
<additional_attributes>180.0;440.0;180.0;480.0;10.0;480.0;10.0;10.0;90.0;10.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>462</x>
<y>602</y>
<w>112</w>
<h>210</h>
</coordinates>
<panel_attributes>lt=-&gt;
m1=evPoll\n[default]</panel_attributes>
<additional_attributes>10.0;10.0;10.0;130.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>728</x>
<y>70</y>
<w>308</w>
<h>154</h>
</coordinates>
<panel_attributes>lt=-&gt;
evInitSender</panel_attributes>
<additional_attributes>10.0;10.0;10.0;50.0;200.0;50.0;200.0;90.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>784</x>
<y>252</y>
<w>224</w>
<h>140</h>
</coordinates>
<panel_attributes>lt=-&gt;
m1=evPoll\n[else]</panel_attributes>
<additional_attributes>100.0;40.0;100.0;70.0;10.0;70.0;10.0;10.0;60.0;10.0</additional_attributes>
</element>
<element>
<id>UMLNote</id>
<coordinates>
<x>434</x>
<y>294</y>
<x>784</x>
<y>28</y>
<w>140</w>
<h>42</h>
<h>56</h>
</coordinates>
<panel_attributes>Reset / Init</panel_attributes>
<panel_attributes>read time on
EPROM</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>868</x>
<y>196</y>
<w>266</w>
<h>112</h>
</coordinates>
<panel_attributes>ALIVE
--
\entry: sender = true
--
sendAliveOnCan</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>868</x>
<y>518</y>
<w>266</w>
<h>84</h>
</coordinates>
<panel_attributes>lt=..
BREAK
-..
</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>294</x>
<y>420</y>
<w>182</w>
<h>196</h>
<x>994</x>
<y>294</y>
<w>210</w>
<h>252</h>
</coordinates>
<panel_attributes>lt=-&gt;
m1=[alive]</panel_attributes>
<additional_attributes>10.0;110.0;110.0;110.0;110.0;10.0;70.0;10.0</additional_attributes>
<panel_attributes>lt=..&gt;
m1=evPoll\n[time==0]\n[haveBreak]</panel_attributes>
<additional_attributes>60.0;10.0;60.0;110.0;10.0;110.0;10.0;160.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>140</x>
<y>308</y>
<w>168</w>
<h>490</h>
<x>560</x>
<y>546</y>
<w>336</w>
<h>182</h>
</coordinates>
<panel_attributes>lt=-&gt;
evACborn</panel_attributes>
<additional_attributes>100.0;290.0;100.0;330.0;10.0;330.0;10.0;10.0;50.0;10.0</additional_attributes>
<panel_attributes>lt=..&gt;
m1=evPoll\n[time==0]\n[haveBreak]</panel_attributes>
<additional_attributes>10.0;50.0;10.0;110.0;90.0;110.0;170.0;10.0;220.0;10.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>602</x>
<y>546</y>
<w>420</w>
<h>182</h>
</coordinates>
<panel_attributes>lt=..&gt;
m1=evStart\n[checker]</panel_attributes>
<additional_attributes>220.0;40.0;220.0;110.0;140.0;110.0;60.0;10.0;10.0;10.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>1078</x>
<y>252</y>
<w>182</w>
<h>476</h>
</coordinates>
<panel_attributes>lt=..&gt;
m1=evStart\n[sender]</panel_attributes>
<additional_attributes>10.0;250.0;10.0;320.0;110.0;320.0;110.0;10.0;40.0;10.0</additional_attributes>
</element>
<element>
<id>UMLNote</id>
<coordinates>
<x>868</x>
<y>728</y>
<w>266</w>
<h>154</h>
</coordinates>
<panel_attributes>lt=..
break part can be disable
with setHaveBreak(false)
not all childrens have a break
for time at 0</panel_attributes>
<additional_attributes/>
</element>
</diagram>

29
UML/can.puml Normal file
View File

@ -0,0 +1,29 @@
@startuml
actor CAN_BUS as bus
participant interrupt as ISR
queue XF as xf
participant ecan as ecan
participant can_interface as can
control can_message as msg
bus -\\ ISR ++ : can message
ISR -> can : newMsg
can -> ecan : read
ecan --> can : message
can -> xf : POST XF
destroy ISR
group clock xf [every 10ms]
xf o-> can : receiveCan
can -> msg : processIncome
msg -> can : create message
can -> xf : POST XF
end
group clock xf [every 10ms]
xf o-> can : sendCan
can -> ecan : write
ecan -\\ bus : can message
end
@enduml

BIN
UML/can_sequence.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<diagram program="umlet" version="15.0.0">
<zoom_level>7</zoom_level>
<zoom_level>10</zoom_level>
<element>
<id>UMLClass</id>
<coordinates>
<x>105</x>
<y>77</y>
<w>301</w>
<h>126</h>
<x>80</x>
<y>100</y>
<w>430</w>
<h>180</h>
</coordinates>
<panel_attributes>CAN_INTERFACE
--
@ -28,10 +28,10 @@ CAN_setSender(idSender: uint8_t): void</panel_attributes>
<element>
<id>UMLClass</id>
<coordinates>
<x>315</x>
<y>350</y>
<w>301</w>
<h>126</h>
<x>0</x>
<y>390</y>
<w>430</w>
<h>180</h>
</coordinates>
<panel_attributes>JOYSTICK
--
@ -51,10 +51,33 @@ CAN_setSender(idSender: uint8_t): void</panel_attributes>
<element>
<id>UMLClass</id>
<coordinates>
<x>812</x>
<y>154</y>
<w>322</w>
<h>504</h>
<x>580</x>
<y>370</y>
<w>490</w>
<h>210</h>
</coordinates>
<panel_attributes>MEMORY_CST
--
+CM_processIncome(idSender: uint8_t, idMsg: uint8_t, data: uint32_t): void
+CM_CONTROLLER_ALIVE(p: void*): void
+CM_JOY_SETUP(p: void*): void
+CM_DISPLAY_SETUP(p: void*): void
+CM_DISPLAY_SPEED(p: void*): void
+CM_DISPLAY_DIRECTION(p: void*): void
+CM_DRIVE_SETUP(p: void*): void
+CM_DRIVE_POWER(p: void*): void
+CM_STEERING_SETUP(p: void*): void
+CM_STEERING_SET(p: void*): void
+CM_SUPPLY_SETUP(p: void*): void</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>1140</x>
<y>40</y>
<w>460</w>
<h>720</h>
</coordinates>
<panel_attributes>MEMORY_CST
--

BIN
UML/drive.pdf Normal file

Binary file not shown.

137
UML/drive.uxf Normal file
View File

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<diagram program="umlet" version="15.0.0">
<zoom_level>15</zoom_level>
<element>
<id>Relation</id>
<coordinates>
<x>660</x>
<y>90</y>
<w>210</w>
<h>120</h>
</coordinates>
<panel_attributes>lt=-&gt;
evInit
/startAliveChecker
</panel_attributes>
<additional_attributes>10.0;10.0;10.0;60.0</additional_attributes>
</element>
<element>
<id>UMLSpecialState</id>
<coordinates>
<x>660</x>
<y>75</y>
<w>30</w>
<h>30</h>
</coordinates>
<panel_attributes>type=initial</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>540</x>
<y>405</y>
<w>270</w>
<h>105</h>
</coordinates>
<panel_attributes>RUN
--
/entry: LED ON
--
emitPollTorqueEv</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>735</x>
<y>450</y>
<w>195</w>
<h>270</h>
</coordinates>
<panel_attributes>lt=-&gt;
m1= evPollTorque\n/sendTorque
</panel_attributes>
<additional_attributes>10.0;100.0;10.0;160.0;110.0;160.0;110.0;10.0;50.0;10.0</additional_attributes>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>495</x>
<y>180</y>
<w>360</w>
<h>135</h>
</coordinates>
<panel_attributes>WAIT
--
ALIVE_emitBorn(ALjoy(), 0, 0);
ALIVE_emitReady(ALjoy(), 100, 0);
setAliveTime</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>660</x>
<y>300</y>
<w>120</w>
<h>135</h>
</coordinates>
<panel_attributes>lt=-&gt;
m1=evStart\n(onWait)
</panel_attributes>
<additional_attributes>10.0;10.0;10.0;70.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>735</x>
<y>450</y>
<w>195</w>
<h>180</h>
</coordinates>
<panel_attributes>lt=-&gt;
m1= evPollSpeed\n/sendSpeed
</panel_attributes>
<additional_attributes>10.0;40.0;10.0;100.0;110.0;100.0;110.0;10.0;50.0;10.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>390</x>
<y>240</y>
<w>345</w>
<h>555</h>
</coordinates>
<panel_attributes>lt=-&gt;
m1= evResurrect\n(onBorn)
</panel_attributes>
<additional_attributes>130.0;300.0;130.0;350.0;10.0;350.0;10.0;10.0;70.0;10.0</additional_attributes>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>450</x>
<y>600</y>
<w>270</w>
<h>90</h>
</coordinates>
<panel_attributes>DEAD
--
/entry: LED OFF</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>570</x>
<y>495</y>
<w>135</w>
<h>135</h>
</coordinates>
<panel_attributes>lt=-&gt;
m1=evStop\n(onDead)
</panel_attributes>
<additional_attributes>10.0;10.0;10.0;70.0</additional_attributes>
</element>
</diagram>

View File

@ -8,7 +8,7 @@
<IsLogFilterEnabled>FALSE</IsLogFilterEnabled>
<IsLogFilterLINEnabled>FALSE</IsLogFilterLINEnabled>
<IsLoggingEnabled>FALSE</IsLoggingEnabled>
<IsMsgIntepretationEnabled>FALSE</IsMsgIntepretationEnabled>
<IsMsgIntepretationEnabled>TRUE</IsMsgIntepretationEnabled>
<IsOverWriteEnabled>TRUE</IsOverWriteEnabled>
<DisplayTimeMode>SYSTEM</DisplayTimeMode>
<DisplayNumericMode>FALSE</DisplayNumericMode>
@ -28,10 +28,34 @@
<CAN_Database_Files>
<FilePath>threewheeler.DBF</FilePath>
</CAN_Database_Files>
<Bus_Statistics>
<CAN_Statistics>
<COLUMN>
<ID>Parameter</ID>
<Order>1</Order>
<Width>200</Width>
<IsVisible>1</IsVisible>
</COLUMN>
<COLUMN>
<ID>Channel 1</ID>
<Order>2</Order>
<Width>90</Width>
<IsVisible>1</IsVisible>
</COLUMN>
</CAN_Statistics>
<Window_Position>
<Visibility>SHOWNORMAL</Visibility>
<WindowPlacement>RESTORETOMAXIMIZED</WindowPlacement>
<Top>517</Top>
<Left>489</Left>
<Bottom>1014</Bottom>
<Right>911</Right>
</Window_Position>
</Bus_Statistics>
<J1939_Database_Files/>
<CAN_DIL_Section>
<DriverName>MHS Tiny-CAN</DriverName>
<ControllerMode>Bus Off</ControllerMode>
<ControllerMode>Unknown</ControllerMode>
<ControllerSettings>
<Channel>
<BaudRate>250</BaudRate>
@ -85,27 +109,267 @@
</Channel>
</ControllerSettings>
</CAN_DIL_Section>
<CAN_Filters>
<Filter>
<Name>display</Name>
<Type>PASS</Type>
<FilterMessage>
<IdFrom>306</IdFrom>
<IdTo>306</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
<FilterMessage>
<IdFrom>307</IdFrom>
<IdTo>307</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
<FilterMessage>
<IdFrom>48</IdFrom>
<IdTo>48</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
<FilterMessage>
<IdFrom>799</IdFrom>
<IdTo>799</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
<FilterMessage>
<IdFrom>1585</IdFrom>
<IdTo>1585</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
<FilterMessage>
<IdFrom>1586</IdFrom>
<IdTo>1586</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
<FilterMessage>
<IdFrom>1587</IdFrom>
<IdTo>1587</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
</Filter>
<Filter>
<Name>drive</Name>
<Type>PASS</Type>
<FilterMessage>
<IdFrom>320</IdFrom>
<IdTo>320</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
<FilterMessage>
<IdFrom>321</IdFrom>
<IdTo>321</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
<FilterMessage>
<IdFrom>1040</IdFrom>
<IdTo>1040</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
<FilterMessage>
<IdFrom>1055</IdFrom>
<IdTo>1055</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
</Filter>
<Filter>
<Name>joy</Name>
<Type>PASS</Type>
<FilterMessage>
<IdFrom>288</IdFrom>
<IdTo>288</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
<FilterMessage>
<IdFrom>529</IdFrom>
<IdTo>529</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
<FilterMessage>
<IdFrom>543</IdFrom>
<IdTo>543</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
</Filter>
<Filter>
<Name>noAlive</Name>
<Type>STOP</Type>
<FilterMessage>
<IdFrom>271</IdFrom>
<IdTo>271</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
<FilterMessage>
<IdFrom>543</IdFrom>
<IdTo>543</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
<FilterMessage>
<IdFrom>799</IdFrom>
<IdTo>799</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
<FilterMessage>
<IdFrom>1055</IdFrom>
<IdTo>1055</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
<FilterMessage>
<IdFrom>1311</IdFrom>
<IdTo>1311</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
</Filter>
<Filter>
<Name>steering</Name>
<Type>PASS</Type>
<FilterMessage>
<IdFrom>336</IdFrom>
<IdTo>336</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
<FilterMessage>
<IdFrom>337</IdFrom>
<IdTo>337</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
<FilterMessage>
<IdFrom>1298</IdFrom>
<IdTo>1298</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
<FilterMessage>
<IdFrom>1311</IdFrom>
<IdTo>1311</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
<FilterMessage>
<IdFrom>82</IdFrom>
<IdTo>82</IdTo>
<Direction>ALL</Direction>
<IDType>ALL</IDType>
<MsgType>ALL</MsgType>
<Channel>0</Channel>
</FilterMessage>
</Filter>
</CAN_Filters>
<CAN_Signal_Watch>
<Message>
<Id>288</Id>
<Signal>DeltaY</Signal>
<Signal>aliveTime</Signal>
<Signal>timeMeasureOrDeltaX</Signal>
<Signal>mode</Signal>
<Id>529</Id>
<Signal>posY</Signal>
<Signal>button</Signal>
<Signal>posX</Signal>
</Message>
<Message>
<Id>1040</Id>
<Signal>Speed</Signal>
</Message>
<Message>
<Id>321</Id>
<Signal>Power</Signal>
</Message>
<Message>
<Id>306</Id>
<Signal>Vehiclespeed</Signal>
</Message>
<Message>
<Id>336</Id>
<Signal>HOMING</Signal>
<Signal>RESET</Signal>
<Signal>SET_CENTER</Signal>
<Signal>ALIVE_TIME</Signal>
</Message>
<Message>
<Id>82</Id>
<Signal>CENTER_POS</Signal>
</Message>
<Message>
<Id>1298</Id>
<Signal>POSITION</Signal>
</Message>
<Window_Position>
<Visibility>SHOWNORMAL</Visibility>
<WindowPlacement>HIDE</WindowPlacement>
<Top>622</Top>
<Left>86</Left>
<Right>816</Right>
<Bottom>998</Bottom>
<Top>165</Top>
<Left>599</Left>
<Right>1089</Right>
<Bottom>452</Bottom>
</Window_Position>
<COLUMN_WIDTH>
<MESSAGE_COLUMN>142</MESSAGE_COLUMN>
<Raw_Val_Column>174</Raw_Val_Column>
<Physical_Val_Column>285</Physical_Val_Column>
<Signal_Column>142</Signal_Column>
<MESSAGE_COLUMN>147</MESSAGE_COLUMN>
<Raw_Val_Column>94</Raw_Val_Column>
<Physical_Val_Column>139</Physical_Val_Column>
<Signal_Column>94</Signal_Column>
</COLUMN_WIDTH>
</CAN_Signal_Watch>
<J1939_Signal_Watch>
@ -118,10 +382,10 @@
<Bottom>300</Bottom>
</Window_Position>
<COLUMN_WIDTH>
<MESSAGE_COLUMN>87</MESSAGE_COLUMN>
<Raw_Val_Column>87</Raw_Val_Column>
<Physical_Val_Column>174</Physical_Val_Column>
<Signal_Column>87</Signal_Column>
<MESSAGE_COLUMN>94</MESSAGE_COLUMN>
<Raw_Val_Column>94</Raw_Val_Column>
<Physical_Val_Column>189</Physical_Val_Column>
<Signal_Column>94</Signal_Column>
</COLUMN_WIDTH>
</J1939_Signal_Watch>
<LIN_Signal_Watch>
@ -134,10 +398,10 @@
<Bottom>300</Bottom>
</Window_Position>
<COLUMN_WIDTH>
<MESSAGE_COLUMN>87</MESSAGE_COLUMN>
<Raw_Val_Column>87</Raw_Val_Column>
<Physical_Val_Column>174</Physical_Val_Column>
<Signal_Column>87</Signal_Column>
<MESSAGE_COLUMN>94</MESSAGE_COLUMN>
<Raw_Val_Column>94</Raw_Val_Column>
<Physical_Val_Column>189</Physical_Val_Column>
<Signal_Column>94</Signal_Column>
</COLUMN_WIDTH>
</LIN_Signal_Watch>
<CAN_Signal_Graph>
@ -156,28 +420,42 @@
<Show_Grid>TRUE</Show_Grid>
<Display_Type>NORMAL</Display_Type>
</GRAPH_PARAMETERS>
<GRAPH_ELEMENT>
<Message_ID>321</Message_ID>
<Message_Name>DRIVE_POWER</Message_Name>
<Frame_Format/>
<Element_Name>Power</Element_Name>
<Value_Type>Physical</Value_Type>
<Line_Type>SOLID</Line_Type>
<Line_Color>16711680</Line_Color>
<Point_Type>1</Point_Type>
<Point_Color>8388736</Point_Color>
<Visibility>TRUE</Visibility>
<Enable>TRUE</Enable>
<Display_Type>NORMAL</Display_Type>
</GRAPH_ELEMENT>
<Window_Position>
<Visibility>HIDE</Visibility>
<Window_Position>HIDE</Window_Position>
<Top>-1</Top>
<Left>0</Left>
<Bottom>0</Bottom>
<Right>0</Right>
<Visibility>SHOWNORMAL</Visibility>
<Window_Position>SHOWNORMAL</Window_Position>
<Top>291</Top>
<Left>205</Left>
<Bottom>957</Bottom>
<Right>1530</Right>
</Window_Position>
<Splitter_Window_Col_0>
<CxIdeal>-1</CxIdeal>
<CxIdeal>479</CxIdeal>
<CxMin>0</CxMin>
</Splitter_Window_Col_0>
<Splitter_Window_Col_1>
<CxIdeal>0</CxIdeal>
<CxIdeal>819</CxIdeal>
<CxMin>0</CxMin>
</Splitter_Window_Col_1>
<Splitter_Window_Row_0>
<CxIdeal>0</CxIdeal>
<CxIdeal>308</CxIdeal>
<CxMin>0</CxMin>
</Splitter_Window_Row_0>
<Splitter_Window_Row_1>
<CxIdeal>0</CxIdeal>
<CxIdeal>308</CxIdeal>
<CxMin>0</CxMin>
</Splitter_Window_Row_1>
</CAN_Signal_Graph>
@ -192,12 +470,12 @@
</LIN_Log>
<CAN_Simulated_Systems>
<Window_Position>
<Visibility>HIDE</Visibility>
<Visibility>SHOWNORMAL</Visibility>
<WindowPlacement>RESTORETOMAXIMIZED</WindowPlacement>
<Top>0</Top>
<Left>0</Left>
<Bottom>0</Bottom>
<Right>0</Right>
<Bottom>577</Bottom>
<Right>423</Right>
</Window_Position>
</CAN_Simulated_Systems>
<J1939_Simulated_Systems>
@ -212,38 +490,43 @@
</J1939_Simulated_Systems>
<CAN_Replay/>
<CAN_Message_Window>
<Append_Buffer_Size>5000</Append_Buffer_Size>
<Overwrite_Buffer_Size>2000</Overwrite_Buffer_Size>
<Display_Update_Time>100</Display_Update_Time>
<Append_Buffer_Size>1489464112</Append_Buffer_Size>
<Overwrite_Buffer_Size>26186104</Overwrite_Buffer_Size>
<Display_Update_Time>1489464084</Display_Update_Time>
<Filter IsEnabled="0">display</Filter>
<Filter IsEnabled="0">drive</Filter>
<Filter IsEnabled="0">joy</Filter>
<Filter IsEnabled="1">noAlive</Filter>
<Filter IsEnabled="0">steering</Filter>
<COLUMN>
<ID/>
<Order>5</Order>
<IsVisible>1</IsVisible>
<Width>19</Width>
</COLUMN>
<COLUMN>
<ID>Time</ID>
<Order>4</Order>
<IsVisible>1</IsVisible>
<Width>129</Width>
</COLUMN>
<COLUMN>
<ID>Tx/Rx</ID>
<Order>1</Order>
<IsVisible>1</IsVisible>
<Width>53</Width>
</COLUMN>
<COLUMN>
<ID>Channel</ID>
<Order>2</Order>
<IsVisible>0</IsVisible>
<Width>0</Width>
</COLUMN>
<COLUMN>
<ID>Time</ID>
<Order>2</Order>
<IsVisible>1</IsVisible>
<Width>138</Width>
</COLUMN>
<COLUMN>
<ID>Tx/Rx</ID>
<Order>3</Order>
<IsVisible>1</IsVisible>
<Width>85</Width>
</COLUMN>
<COLUMN>
<ID>Channel</ID>
<Order>4</Order>
<IsVisible>1</IsVisible>
<Width>92</Width>
</COLUMN>
<COLUMN>
<ID>Msg Type</ID>
<Order>5</Order>
<IsVisible>1</IsVisible>
<Width>71</Width>
<Order>3</Order>
<IsVisible>0</IsVisible>
<Width>0</Width>
</COLUMN>
<COLUMN>
<ID>ID</ID>
@ -255,39 +538,39 @@
<ID>Message</ID>
<Order>7</Order>
<IsVisible>1</IsVisible>
<Width>174</Width>
<Width>143</Width>
</COLUMN>
<COLUMN>
<ID>DLC</ID>
<Order>8</Order>
<IsVisible>1</IsVisible>
<Width>75</Width>
<Width>38</Width>
</COLUMN>
<COLUMN>
<ID>Data Byte(s)</ID>
<Order>9</Order>
<IsVisible>1</IsVisible>
<Width>198</Width>
<Width>139</Width>
</COLUMN>
<IsHex>1</IsHex>
<IsAppend>0</IsAppend>
<IsInterpret>0</IsInterpret>
<IsInterpret>1</IsInterpret>
<Time_Mode>SYSTEM</Time_Mode>
<Window_Position>
<Visibility>SHOWNORMAL</Visibility>
<WindowPlacement>RESTORETOMAXIMIZED</WindowPlacement>
<WindowPlacement>SETMINPOSITION</WindowPlacement>
<Top>0</Top>
<Left>0</Left>
<Bottom>295</Bottom>
<Right>909</Right>
<Bottom>810</Bottom>
<Right>606</Right>
</Window_Position>
<Interpretation_Window_Position>
<Visibility>SHOWNORMAL</Visibility>
<WindowPlacement>RESTORETOMAXIMIZED</WindowPlacement>
<Top>271</Top>
<Left>879</Left>
<Bottom>958</Bottom>
<Right>1552</Right>
<Top>173</Top>
<Left>10</Left>
<Bottom>451</Bottom>
<Right>359</Right>
</Interpretation_Window_Position>
</CAN_Message_Window>
<J1939_Message_Window>
@ -370,23 +653,23 @@
<Width>720</Width>
</COLUMN>
<IsHex>1</IsHex>
<IsAppend>0</IsAppend>
<IsAppend>1</IsAppend>
<IsInterpret>0</IsInterpret>
<Time_Mode>SYSTEM</Time_Mode>
<Window_Position>
<Visibility>SHOWNORMAL</Visibility>
<WindowPlacement>RESTORETOMAXIMIZED</WindowPlacement>
<WindowPlacement>SETMINPOSITION</WindowPlacement>
<Top>0</Top>
<Left>0</Left>
<Bottom>543</Bottom>
<Bottom>549</Bottom>
<Right>1614</Right>
</Window_Position>
<Interpretation_Window_Position>
<Visibility>SHOWNORMAL</Visibility>
<WindowPlacement>RESTORETOMAXIMIZED</WindowPlacement>
<Top>179</Top>
<Top>173</Top>
<Left>10</Left>
<Bottom>457</Bottom>
<Bottom>451</Bottom>
<Right>359</Right>
</Interpretation_Window_Position>
</J1939_Message_Window>
@ -455,23 +738,23 @@
<Width>734</Width>
</COLUMN>
<IsHex>1</IsHex>
<IsAppend>0</IsAppend>
<IsAppend>1</IsAppend>
<IsInterpret>0</IsInterpret>
<Time_Mode>SYSTEM</Time_Mode>
<Window_Position>
<Visibility>SHOWNORMAL</Visibility>
<WindowPlacement>RESTORETOMAXIMIZED</WindowPlacement>
<WindowPlacement>SETMINPOSITION</WindowPlacement>
<Top>0</Top>
<Left>0</Left>
<Bottom>543</Bottom>
<Bottom>549</Bottom>
<Right>1614</Right>
</Window_Position>
<Interpretation_Window_Position>
<Visibility>SHOWNORMAL</Visibility>
<WindowPlacement>RESTORETOMAXIMIZED</WindowPlacement>
<Top>179</Top>
<Top>173</Top>
<Left>10</Left>
<Bottom>457</Bottom>
<Bottom>451</Bottom>
<Right>359</Right>
</Interpretation_Window_Position>
</LIN_Message_Window>
@ -479,15 +762,27 @@
<Window_Position>
<Visibility>SHOWNORMAL</Visibility>
<WindowPlacement>SETMINPOSITION</WindowPlacement>
<Top>12</Top>
<Left>989</Left>
<Bottom>667</Bottom>
<Right>1849</Right>
<Top>3</Top>
<Left>1052</Left>
<Bottom>658</Bottom>
<Right>1912</Right>
</Window_Position>
<Message_List>
<Message>
<Channel>1</Channel>
<Message_ID>528</Message_ID>
<Message_ID>16</Message_ID>
<IsExtended>FALSE</IsExtended>
<IsRtr>FALSE</IsRtr>
<DLC>4</DLC>
<DataBytes>0,0,0,10</DataBytes>
<Repetion>10</Repetion>
<Repetition_Enabled>FALSE</Repetition_Enabled>
<Key_Value>a</Key_Value>
<Key_Enabled>FALSE</Key_Enabled>
</Message>
<Message>
<Channel>1</Channel>
<Message_ID>17</Message_ID>
<IsExtended>FALSE</IsExtended>
<IsRtr>FALSE</IsRtr>
<DLC>4</DLC>
@ -499,7 +794,7 @@
</Message>
<Message>
<Channel>1</Channel>
<Message_ID>529</Message_ID>
<Message_ID>18</Message_ID>
<IsExtended>FALSE</IsExtended>
<IsRtr>FALSE</IsRtr>
<DLC>4</DLC>
@ -511,11 +806,11 @@
</Message>
<Message>
<Channel>1</Channel>
<Message_ID>288</Message_ID>
<Message_ID>19</Message_ID>
<IsExtended>FALSE</IsExtended>
<IsRtr>FALSE</IsRtr>
<DLC>4</DLC>
<DataBytes>0,255,1,5</DataBytes>
<DataBytes>0,0,0,0</DataBytes>
<Repetion>10</Repetion>
<Repetition_Enabled>FALSE</Repetition_Enabled>
<Key_Value>a</Key_Value>
@ -523,11 +818,35 @@
</Message>
<Message>
<Channel>1</Channel>
<Message_ID>543</Message_ID>
<Message_ID>20</Message_ID>
<IsExtended>FALSE</IsExtended>
<IsRtr>FALSE</IsRtr>
<DLC>1</DLC>
<DataBytes>0</DataBytes>
<DLC>2</DLC>
<DataBytes>0,0</DataBytes>
<Repetion>10</Repetion>
<Repetition_Enabled>FALSE</Repetition_Enabled>
<Key_Value>a</Key_Value>
<Key_Enabled>FALSE</Key_Enabled>
</Message>
<Message>
<Channel>1</Channel>
<Message_ID>21</Message_ID>
<IsExtended>FALSE</IsExtended>
<IsRtr>FALSE</IsRtr>
<DLC>4</DLC>
<DataBytes>0,0,0,0</DataBytes>
<Repetion>10</Repetion>
<Repetition_Enabled>FALSE</Repetition_Enabled>
<Key_Value>a</Key_Value>
<Key_Enabled>FALSE</Key_Enabled>
</Message>
<Message>
<Channel>1</Channel>
<Message_ID>22</Message_ID>
<IsExtended>FALSE</IsExtended>
<IsRtr>FALSE</IsRtr>
<DLC>4</DLC>
<DataBytes>0,5,1,25</DataBytes>
<Repetion>10</Repetion>
<Repetition_Enabled>FALSE</Repetition_Enabled>
<Key_Value>a</Key_Value>

View File

@ -6,7 +6,7 @@
[BUSMASTER_VERSION] [3.2.2]
[NUMBER_OF_MESSAGES] 25
[NUMBER_OF_MESSAGES] 29
[START_MSG] JOY_MEASURE,529,3,3,1,S
[START_SIGNALS] posX,8,1,0,I,127,-128,1,0.000000,1.000000,%,
@ -38,10 +38,11 @@
[VALUE_DESCRIPTION] RACE,2
[END_MSG]
[START_MSG] CONTROL_SETUP,16,4,2,1,S
[START_MSG] CONTROL_SETUP,16,4,3,1,S
[START_SIGNALS] AliveTime,8,4,0,U,255,0,1,0.000000,10.000000,mS,
[VALUE_DESCRIPTION] No alive message,0
[START_SIGNALS] STEERING_MODE,1,1,0,B,1,0,1,0.000000,1.000000,,
[START_SIGNALS] ERASE_MEMORY,1,2,0,B,1,0,1,0.000000,1.000000,,
[END_MSG]
[START_MSG] CONTROL_SPEED_FACTOR,17,4,1,1,S
@ -71,7 +72,7 @@
[VALUE_DESCRIPTION] No alive message,0
[END_MSG]
[START_MSG] DISPLAY_SETUP,48,4,1,1,S
[START_MSG] DISPLAY_SETUP,304,4,1,1,S
[START_SIGNALS] AliveTime,8,4,0,U,255,0,1,0.000000,10.000000,ms,
[END_MSG]
@ -151,3 +152,28 @@
[START_MSG] STEERING_GET_POS,1298,4,1,1,S
[START_SIGNALS] POSITION,32,4,0,I,2147483647,-2147483648,0,0.000000,1.000000,qc,
[END_MSG]
[START_MSG] CONTROL_SETUP_PARAM_JOY,22,4,4,1,S
[START_SIGNALS] mode,1,1,0,B,1,0,1,0.000000,1.000000,,
[START_SIGNALS] timeMeasureOrDeltaX,8,2,0,U,255,0,1,0.000000,10.000000,msOrVal,
[START_SIGNALS] DeltaY,8,3,0,U,255,0,1,0.000000,1.000000,val,
[START_SIGNALS] aliveTime,8,4,0,U,255,0,1,0.000000,10.000000,ms,
[END_MSG]
[START_MSG] CONTROL_SETUP_DRIVE,23,4,3,1,S
[START_SIGNALS] driveAliveTime,8,1,0,U,255,0,1,0.000000,10.000000,ms,
[START_SIGNALS] driveSpeedTime,8,2,0,U,255,0,1,0.000000,10.000000,ms,
[START_SIGNALS] driveStopTime,8,3,0,U,255,0,1,0.000000,10.000000,ms,
[END_MSG]
[START_MSG] CONTROL_SETUP_PARAM_BATTERY,24,4,4,1,S
[START_SIGNALS] batteryVoltTime,8,1,0,U,255,0,1,0.000000,10.000000,ms,
[START_SIGNALS] batteryCurentTime,8,2,0,U,255,0,1,0.000000,10.000000,ms,
[START_SIGNALS] batteryEnergyTime,8,3,0,U,255,0,1,0.000000,10.000000,ms,
[START_SIGNALS] batteryAliveTime,8,4,0,U,255,0,1,0.000000,10.000000,ms,
[END_MSG]
[START_MSG] CONTROL_SETUP_PARAM,21,4,2,1,S
[START_SIGNALS] displayAliveTime,8,1,0,U,255,0,1,0.000000,10.000000,ms,
[START_SIGNALS] steeringAliveTime,8,2,0,U,255,0,1,0.000000,10.000000,ms,
[END_MSG]