add Steering

This commit is contained in:
Rémi Heredero 2023-09-04 15:20:54 +02:00
parent 473d71ff6b
commit f45fd4ae7e
9 changed files with 457 additions and 19 deletions

View File

@ -232,9 +232,19 @@ void CM_processIncome(uint8_t idSender, uint8_t idMsg, bool rtr, uint32_t data){
} }
if(idMsg == 0x3) { // STEERING_READY
// - - - -
}
if(idMsg == 0xF) { // STEERING_ALIVE if(idMsg == 0xF) { // STEERING_ALIVE
// statusH statusL - - // statusH statusL - -
// TODO steering say ALIVE with his status ALIVE_ISALIVE(&steering()->myChecker);
if(steering()->myChecker.state == STST_DEAD) {
KART_CST.STEERING_ALIVE_TIME = MEM_read_1_byte(MEMADD_STEERING_ALIVE_TIME);
ALIVE_emitResurrect(&steering()->myChecker, 0, 0);
ALIVE_emitBorn(&steering()->myChecker, 0, 0);
}
} }
break; break;

View File

@ -12,19 +12,6 @@
#include <stdbool.h> // usage of boolean types #include <stdbool.h> // usage of boolean types
#include "../mcc_generated_files/mcc.h" #include "../mcc_generated_files/mcc.h"
/*
S R M
1 0 F CONTROL_ALIVE - - - -
1 2 0 JOY_SETUP Mode Param1 Param2 aliveTime
1 3 0 DISPLAY_SETUP reset - - aliveTime
1 3 2 DISPLAY_SPEED valH valL - -
1 3 3 DISPLAY_DIRECTION direction - - -
1 4 0 DRIVE_SETUP Reset/init speedTime stopTime aliveTime
1 4 1 DRIVE_POWER valH valL - -
1 5 0 STEERING_SETUP Reset/init homing setCenter aliveTime
1 5 1 STEERING_SET valHH valH valL valLL
1 6 0 SETUP_CONTROL batteryVoltTime batteryCurrentTime batteryEnergyTime aliveTime
*/
/** /**
* Process an incoming message * Process an incoming message

View File

@ -46,6 +46,10 @@ DRIVE* drive(){
return &theFactory.drive_; return &theFactory.drive_;
} }
STEERING* steering(){
return &theFactory.steering_;
}
//initialize all objects //initialize all objects
void Factory_init() { void Factory_init() {
@ -80,6 +84,7 @@ void Factory_init() {
ALIVE_init(ALjoy()); ALIVE_init(ALjoy());
DRIVE_init(drive()); DRIVE_init(drive());
STEERING_init(steering());
} }
//connect objects if required //connect objects if required
@ -100,6 +105,9 @@ void Factory_build() {
DRIVE_onRun(drive(), LED_on, l2()); DRIVE_onRun(drive(), LED_on, l2());
DRIVE_onDead(drive(), LED_off, l2()); DRIVE_onDead(drive(), LED_off, l2());
STEERING_onRun(drive(), LED_on, l3());
STEERING_onDead(drive(), LED_off, l3());
} }
//start all state machines //start all state machines

View File

@ -16,6 +16,7 @@
#include "../can_message.h" #include "../can_message.h"
#include "../eeprom.h" #include "../eeprom.h"
#include "../drive.h" #include "../drive.h"
#include "../steering.h"
#include "../../board/led/led.h" #include "../../board/led/led.h"
#include "../../board/button/button.h" #include "../../board/button/button.h"
#include "../../middleware/alive.h" #include "../../middleware/alive.h"
@ -38,6 +39,7 @@ typedef struct {
ALIVE ALcontroller_; ALIVE ALcontroller_;
ALIVE ALjoy_; ALIVE ALjoy_;
DRIVE drive_; DRIVE drive_;
STEERING steering_;
} Factory; } Factory;
@ -61,6 +63,7 @@ BLINKER* b1();
ALIVE* ALcontroller(); ALIVE* ALcontroller();
ALIVE* ALjoy(); ALIVE* ALjoy();
DRIVE* drive(); DRIVE* drive();
STEERING* steering();
#endif #endif

View File

@ -0,0 +1,164 @@
/**
* @author Rémi Heredero
* @version 1.0.0
* @date September 2023
* @file steering.c
*/
#include "steering.h"
#include "can_message.h"
#include "car.h"
//#include "drive.h"
void STEERING_init(STEERING* me){
me->state = STST_INIT;
ALIVE_init(&me->myChecker);
ALIVE_onSetup(&me->myChecker, CM_STEERING_SETUP, &ALWAYSFALSE);
ALIVE_onWait(&me->myChecker, STEERING_emitStart, me);
ALIVE_onDead(&me->myChecker, STEERING_emitStop, me);
ALIVE_onBorn(&me->myChecker, STEERING_emitResurrect, me);
me->wait.f = NULL;
me->run.f = NULL;
me->dead.f = NULL;
}
void STEERING_startBehaviour(STEERING* me){
POST(me, &STEERING_processEvent, evSTinit, 100, 0);
}
bool STEERING_processEvent(Event* ev) {
bool processed = false;
STEERING* me = (STEERING*)Event_getTarget(ev);
STEERING_STATES oldState = me->state;
evIDT evid = Event_getId(ev);
uint64_t data = Event_getData(ev);
switch (me->state) { // onState
case STST_INIT:
if (ev->id == evSTinit) {
me->state = STST_WAIT;
ALIVE_startBehaviourChecker(&me->myChecker); // Start alive checker
}
break;
case STST_WAIT:
if (ev->id == evSTstart) {
me->state = STST_RUN;
}
ALIVE_setAliveTime(&me->myChecker, KART_CST.STEERING_ALIVE_TIME);
ALIVE_emitBorn(&me->myChecker, 100, 0);
ALIVE_emitReady(&me->myChecker, 200, 0);
break;
case STST_RUN:
if (ev->id == evSTstop) {
me->state = STST_DEAD;
}
if (ev->id == evSTpollDir) {
//if(drive()->state == STDR_RUN) {
CM_STEERING_SET(&eKart.position);
//}
}
break;
case STST_DEAD:
if (ev->id == evSTresurrect) {
me->state = STST_WAIT;
}
break;
}
if(oldState != me->state){
switch (oldState) { // onExit
case STST_INIT:
break;
case STST_WAIT:
break;
case STST_RUN:
break;
case STST_DEAD:
break;
}
switch (me->state) { // onEntry
case STST_INIT:
break;
case STST_WAIT:
if (me->wait.f != NULL) {
me->wait.f(me->wait.p);
}
break;
case STST_RUN:
if (me->run.f != NULL) {
me->run.f(me->run.p);
}
break;
case STST_DEAD:
if (me->dead.f != NULL) {
me->dead.f(me->dead.p);
}
break;
}
processed = true;
}
return processed;
}
/*************
* Callbacks *
*************/
void STEERING_onWait(STEERING* me, STEERING_CALLBACK_FUNCTION f, void* p) {
me->wait.f = f;
me->wait.p = p;
}
void STEERING_onRun(STEERING* me, STEERING_CALLBACK_FUNCTION f, void* p) {
me->run.f = f;
me->run.p = p;
}
void STEERING_onDead(STEERING* me, STEERING_CALLBACK_FUNCTION f, void* p) {
me->dead.f = f;
me->dead.p = p;
}
/************
* EMITTERS *
************/
void STEERING_emitStart(void* p) {
STEERING* me = (STEERING*) p;
POST(me, &STEERING_processEvent, evSTstart, 0, 0);
}
void STEERING_emitStop(void* p) {
STEERING* me = (STEERING*) p;
POST(me, &STEERING_processEvent, evSTstop, 0, 0);
}
void STEERING_emitResurrect(void* p) {
STEERING* me = (STEERING*) p;
POST(me, &STEERING_processEvent, evSTresurrect, 0, 0);
}
void STEERING_emitPollDir(void* p) {
STEERING* me = (STEERING*) p;
POST(me, &STEERING_processEvent, evSTpollDir, 0, 0);
}
/***********
* SETTERS *
***********/
void STEERING_setMyChecker(STEERING* me, ALIVE v) {
me->myChecker = v;
}

View File

@ -0,0 +1,124 @@
/**
* @author Rémi Heredero
* @version 1.0.0
* @date September 2023
* @file steering.h
*/
#ifndef STEERING_H
#define STEERING_H
#include "../xf/xf.h"
#include "../middleware/alive.h"
typedef enum {
STST_INIT = 110,
STST_WAIT,
STST_RUN,
STST_DEAD
} STEERING_STATES;
typedef enum {
evSTinit = 110,
evSTstart,
evSTstop,
evSTresurrect,
evSTpollDir
} STEERING_EVENTS;
typedef void (*STEERING_CALLBACK_FUNCTION)(void*);
typedef struct {
STEERING_CALLBACK_FUNCTION f; // function
void* p; // param(s)
} STEERING_CALLBACK;
typedef struct {
STEERING_STATES state;
ALIVE myChecker;
STEERING_CALLBACK wait;
STEERING_CALLBACK run;
STEERING_CALLBACK dead;
} STEERING;
/**
* Initialize the STEERING
* @param me the STEERING itself
*/
void STEERING_init(STEERING* me);
/**
* Start the STEERING state machine
* @param me the STEERING itself
*/
void STEERING_startBehaviour(STEERING* me);
/**
* Process the event
* @param ev the event to process
* @return true if the event is processed
*/
bool STEERING_processEvent(Event* ev);
/*************
* Callbacks *
*************/
/**
* Set the callback function to call when the STEERING is entering state wait
* @param me the STEERING itself
* @param f the function to call
* @param p the param(s) to pass to the function
*/
void STEERING_onWait(STEERING* me, STEERING_CALLBACK_FUNCTION f, void* p);
/**
* Set the callback function to call when the STEERING is entering state run
* @param me the STEERING itself
* @param f the function to call
* @param p the param(s) to pass to the function
*/
void STEERING_onRun(STEERING* me, STEERING_CALLBACK_FUNCTION f, void* p);
/**
* Set the callback function to call when the STEERING is entering state dead
* @param me the STEERING itself
* @param f the function to call
* @param p the param(s) to pass to the function
*/
void STEERING_onDead(STEERING* me, STEERING_CALLBACK_FUNCTION f, void* p);
/************
* EMITTERS *
************/
/**
* Emit the start event
* @param p the STEERING itself
*/
void STEERING_emitStart(void* p);
/**
* Emit the stop event
* @param p the STEERING itself
*/
void STEERING_emitStop(void* p);
/**
* Emit the resurrect event
* @param p the STEERING itself
*/
void STEERING_emitResurrect(void* p);
/**
* Emit the pollDir event
* @param me the STEERING itself
* @param t time to wait in ms before triggering event
* @param data data to put on the event for XF
*/
void STEERING_emitPollDir(void* p);
/***********
* SETTERS *
***********/
#endif

View File

@ -51,17 +51,17 @@ OBJECTDIR=build/${CND_CONF}/${IMAGE_TYPE}
DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE} DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE}
# Source Files Quoted if spaced # 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 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 app/steering.c
# Object Files Quoted if spaced # 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 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 ${OBJECTDIR}/app/steering.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 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 ${OBJECTDIR}/app/steering.p1.d
# Object Files # 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 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 ${OBJECTDIR}/app/steering.p1
# Source Files # 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 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 app/steering.c
@ -240,6 +240,14 @@ ${OBJECTDIR}/main.p1: main.c nbproject/Makefile-${CND_CONF}.mk
@-${MV} ${OBJECTDIR}/main.d ${OBJECTDIR}/main.p1.d @-${MV} ${OBJECTDIR}/main.d ${OBJECTDIR}/main.p1.d
@${FIXDEPS} ${OBJECTDIR}/main.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ @${FIXDEPS} ${OBJECTDIR}/main.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/app/steering.p1: app/steering.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/app"
@${RM} ${OBJECTDIR}/app/steering.p1.d
@${RM} ${OBJECTDIR}/app/steering.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/steering.p1 app/steering.c
@-${MV} ${OBJECTDIR}/app/steering.d ${OBJECTDIR}/app/steering.p1.d
@${FIXDEPS} ${OBJECTDIR}/app/steering.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
else else
${OBJECTDIR}/app/factory/factory.p1: app/factory/factory.c nbproject/Makefile-${CND_CONF}.mk ${OBJECTDIR}/app/factory/factory.p1: app/factory/factory.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/app/factory" @${MKDIR} "${OBJECTDIR}/app/factory"
@ -393,6 +401,14 @@ ${OBJECTDIR}/main.p1: main.c nbproject/Makefile-${CND_CONF}.mk
@-${MV} ${OBJECTDIR}/main.d ${OBJECTDIR}/main.p1.d @-${MV} ${OBJECTDIR}/main.d ${OBJECTDIR}/main.p1.d
@${FIXDEPS} ${OBJECTDIR}/main.p1.d $(SILENT) -rsi ${MP_CC_DIR}../ @${FIXDEPS} ${OBJECTDIR}/main.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/app/steering.p1: app/steering.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}/app"
@${RM} ${OBJECTDIR}/app/steering.p1.d
@${RM} ${OBJECTDIR}/app/steering.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/steering.p1 app/steering.c
@-${MV} ${OBJECTDIR}/app/steering.d ${OBJECTDIR}/app/steering.p1.d
@${FIXDEPS} ${OBJECTDIR}/app/steering.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
endif endif
# ------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------

View File

@ -11,6 +11,7 @@
<itemPath>app/kartculator.h</itemPath> <itemPath>app/kartculator.h</itemPath>
<itemPath>app/eeprom.h</itemPath> <itemPath>app/eeprom.h</itemPath>
<itemPath>app/drive.h</itemPath> <itemPath>app/drive.h</itemPath>
<itemPath>app/steering.h</itemPath>
</logicalFolder> </logicalFolder>
<logicalFolder name="board" displayName="board" projectFiles="true"> <logicalFolder name="board" displayName="board" projectFiles="true">
<itemPath>board/led/led.h</itemPath> <itemPath>board/led/led.h</itemPath>
@ -50,6 +51,7 @@
<itemPath>app/kartculator.c</itemPath> <itemPath>app/kartculator.c</itemPath>
<itemPath>app/eeprom.c</itemPath> <itemPath>app/eeprom.c</itemPath>
<itemPath>app/drive.c</itemPath> <itemPath>app/drive.c</itemPath>
<itemPath>app/steering.c</itemPath>
</logicalFolder> </logicalFolder>
<logicalFolder name="board" displayName="board" projectFiles="true"> <logicalFolder name="board" displayName="board" projectFiles="true">
<itemPath>board/led/led.c</itemPath> <itemPath>board/led/led.c</itemPath>

124
UML/steering.uxf Normal file
View File

@ -0,0 +1,124 @@
<?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
--
emitPollDirEv</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLState</id>
<coordinates>
<x>480</x>
<y>180</y>
<w>390</w>
<h>135</h>
</coordinates>
<panel_attributes>WAIT
--
ALIVE_emitBorn(ALsteering(), 0, 0);
ALIVE_emitReady(ALsteering(), 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= evPollDir\n/sendDir
</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;60.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>