polish
This commit is contained in:
parent
744051f61f
commit
75aa68bae2
@ -1,3 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* @author Rémi Heredero (remi@heredero.ch)
|
||||||
|
* @version. 0.0.6
|
||||||
|
* @date 2023-06-15
|
||||||
|
*/
|
||||||
#include "factory.h"
|
#include "factory.h"
|
||||||
|
|
||||||
|
|
||||||
@ -64,12 +69,6 @@ BLINKER* blB() {
|
|||||||
return &theFactory.blB_;
|
return &theFactory.blB_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
LEDBlinker* lb() {
|
|
||||||
return &theFactory.lb_;
|
|
||||||
}
|
|
||||||
|
|
||||||
//initialize all objects
|
//initialize all objects
|
||||||
void Factory_init() {
|
void Factory_init() {
|
||||||
LED_init(l1(), 1);
|
LED_init(l1(), 1);
|
||||||
@ -137,7 +136,6 @@ void Factory_build() {
|
|||||||
|
|
||||||
//start all state machines
|
//start all state machines
|
||||||
void Factory_start() {
|
void Factory_start() {
|
||||||
//LEDBlinker_startBehaviour(lb());
|
|
||||||
BUTTON_startBehaviour(b1());
|
BUTTON_startBehaviour(b1());
|
||||||
BUTTON_startBehaviour(b2());
|
BUTTON_startBehaviour(b2());
|
||||||
BUTTON_startBehaviour(b3());
|
BUTTON_startBehaviour(b3());
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
/* this is the Factory class */
|
/**
|
||||||
|
* @author Rémi Heredero (remi@heredero.ch)
|
||||||
|
* @version. 0.0.6
|
||||||
|
* @date 2023-06-15
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef FACTORY_H
|
#ifndef FACTORY_H
|
||||||
#define FACTORY_H
|
#define FACTORY_H
|
||||||
@ -9,7 +12,6 @@
|
|||||||
|
|
||||||
#include "../../board/led/led.h"
|
#include "../../board/led/led.h"
|
||||||
#include "../../board/button/button.h"
|
#include "../../board/button/button.h"
|
||||||
#include "../ledblinker.h"
|
|
||||||
#include "../../middleware/clickHandler.h"
|
#include "../../middleware/clickHandler.h"
|
||||||
#include "../../middleware/blinker.h"
|
#include "../../middleware/blinker.h"
|
||||||
|
|
||||||
@ -32,8 +34,6 @@ typedef struct {
|
|||||||
CLICK_HANDLER ch3_;
|
CLICK_HANDLER ch3_;
|
||||||
BLINKER blA_;
|
BLINKER blA_;
|
||||||
BLINKER blB_;
|
BLINKER blB_;
|
||||||
|
|
||||||
LEDBlinker lb_;
|
|
||||||
} Factory;
|
} Factory;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @file button.h
|
|
||||||
* @author Rémi Heredero (remi@heredero.ch)
|
* @author Rémi Heredero (remi@heredero.ch)
|
||||||
* @version 1
|
* @version. 1.0.0
|
||||||
* @date 2023-06-13
|
* @date 2023-06-15
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
#ifndef BUTTON_H
|
#ifndef BUTTON_H
|
||||||
#define BUTTON_H
|
#define BUTTON_H
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* @file led.h
|
|
||||||
* @author Rémi Heredero (remi@heredero.ch)
|
* @author Rémi Heredero (remi@heredero.ch)
|
||||||
* @version. 1.0.0
|
* @version. 1.0.0
|
||||||
* @date 2023-06-15
|
* @date 2023-06-15
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LED_H
|
#ifndef LED_H
|
||||||
#define LED_H
|
#define LED_H
|
||||||
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @file blinker.c
|
|
||||||
* @author Rémi Heredero (remi@heredero.ch)
|
* @author Rémi Heredero (remi@heredero.ch)
|
||||||
* @version 0
|
* @version. 1.0.0
|
||||||
* @date 2023-06-14
|
* @date 2023-06-15
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "blinker.h"
|
#include "blinker.h"
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @file blinker.h
|
|
||||||
* @author Rémi Heredero (remi@heredero.ch)
|
* @author Rémi Heredero (remi@heredero.ch)
|
||||||
* @version 0
|
* @version. 1.0.0
|
||||||
* @date 2023-06-14
|
* @date 2023-06-15
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef BLINKER_H
|
#ifndef BLINKER_H
|
||||||
@ -32,7 +31,7 @@ typedef struct {
|
|||||||
} blinkerCallBack;
|
} blinkerCallBack;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
BLINKER_STATES state;
|
BLINKER_STATES state; // Actual state
|
||||||
uint16_t tON; // Time on
|
uint16_t tON; // Time on
|
||||||
uint16_t tOFF; // Time off
|
uint16_t tOFF; // Time off
|
||||||
uint8_t nBlink; // Number of blink for this blinker when start with blinkN
|
uint8_t nBlink; // Number of blink for this blinker when start with blinkN
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @file clickHandler.c
|
|
||||||
* @author Rémi Heredero (remi@heredero.ch)
|
* @author Rémi Heredero (remi@heredero.ch)
|
||||||
* @version 0
|
* @version. 1.0.0
|
||||||
* @date 2023-06-13
|
* @date 2023-06-15
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "clickHandler.h"
|
#include "clickHandler.h"
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @file clickHandler.h
|
|
||||||
* @author Rémi Heredero (remi@heredero.ch)
|
* @author Rémi Heredero (remi@heredero.ch)
|
||||||
* @version 1
|
* @version. 1.0.0
|
||||||
* @date 2023-06-14
|
* @date 2023-06-15
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CLICKHANDLER_H
|
#ifndef CLICKHANDLER_H
|
||||||
|
Reference in New Issue
Block a user