Skip to content

Commit 179f0b7

Browse files
author
JeromeGalan
authored
Merge pull request #254 from Luos-io/rc_2.5.1
Luos_engine release 2.5.1
2 parents 1181f02 + aa98ed7 commit 179f0b7

File tree

387 files changed

+29163
-287
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

387 files changed

+29163
-287
lines changed

.github/workflows/build.yml

+11
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ jobs:
102102
platformio run -d examples/projects/NUCLEO-L432KC/led
103103
platformio run -d examples/projects/NUCLEO-L432KC/servo
104104
platformio run -d examples/projects/NUCLEO-L432KC/bootloader
105+
platformio run -d examples/projects/NUCLEO-L432KC/dc_motor
106+
platformio run -d examples/projects/NUCLEO-L432KC/potentiometre
105107
# STM32F4-discovery
106108
platformio run -d examples/projects/STM32F4-discovery/button
107109
platformio run -d examples/projects/STM32F4-discovery/gate_serialcom
@@ -113,17 +115,23 @@ jobs:
113115
platformio run -d examples/projects/NUCLEO-F401RE/inspector_serialcom
114116
platformio run -d examples/projects/NUCLEO-F401RE/led
115117
platformio run -d examples/projects/NUCLEO-F401RE/bootloader
118+
platformio run -d examples/projects/NUCLEO-F401RE/dc_motor
119+
platformio run -d examples/projects/NUCLEO-F401RE/potentiometer
116120
# NUCLEO-F410RB
117121
platformio run -d examples/projects/NUCLEO-F410RB/button
118122
platformio run -d examples/projects/NUCLEO-F410RB/gate_serialcom
119123
platformio run -d examples/projects/NUCLEO-F410RB/inspector_serialcom
120124
platformio run -d examples/projects/NUCLEO-F410RB/bootloader
125+
platformio run -d examples/projects/NUCLEO-F410RB/dc_motor
126+
platformio run -d examples/projects/NUCLEO-F410RB/potentiometer
121127
# ******** missing bootloader ********
122128
# NUCLEO-G431KB
123129
platformio run -d examples/projects/NUCLEO-G431KB/button
124130
platformio run -d examples/projects/NUCLEO-G431KB/gate_serialcom
125131
platformio run -d examples/projects/NUCLEO-G431KB/inspector_serialcom
126132
platformio run -d examples/projects/NUCLEO-G431KB/bootloader
133+
platformio run -d examples/projects/NUCLEO-G431KB/dc_motor
134+
platformio run -d examples/projects/NUCLEO-G431KB/potentiometer
127135
# NUCLEO-G474RE
128136
platformio run -d examples/projects/NUCLEO-G474RE/button
129137
platformio run -d examples/projects/NUCLEO-G474RE/gate_serialcom
@@ -133,5 +141,8 @@ jobs:
133141
platformio run -d examples/projects/NUCLEO-F072RB/gate_serialcom
134142
platformio run -d examples/projects/NUCLEO-F072RB/inspector_serialcom
135143
platformio run -d examples/projects/NUCLEO-F072RB/bootloader
144+
platformio run -d examples/projects/NUCLEO-F072RB/button
145+
platformio run -d examples/projects/NUCLEO-F072RB/dc_motor
146+
platformio run -d examples/projects/NUCLEO-F072RB/potentiometer
136147
# SAMD21XPLAINED
137148
# ******** missing bootloader CI ********

.github/workflows/dev-build.yml

+12
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ jobs:
5353
5454
# Run Unit tests
5555
platformio test -c .\test\_resources\platformio.ini -vvv
56+
continue-on-error: true
5657

5758
- name: Run PlatformIO
5859
run: |
@@ -101,6 +102,8 @@ jobs:
101102
platformio run -d examples/projects/NUCLEO-L432KC/led
102103
platformio run -d examples/projects/NUCLEO-L432KC/servo
103104
platformio run -d examples/projects/NUCLEO-L432KC/bootloader
105+
platformio run -d examples/projects/NUCLEO-L432KC/dc_motor
106+
platformio run -d examples/projects/NUCLEO-L432KC/potentiometre
104107
# STM32F4-discovery
105108
platformio run -d examples/projects/STM32F4-discovery/button
106109
platformio run -d examples/projects/STM32F4-discovery/gate_serialcom
@@ -112,16 +115,22 @@ jobs:
112115
platformio run -d examples/projects/NUCLEO-F401RE/inspector_serialcom
113116
platformio run -d examples/projects/NUCLEO-F401RE/led
114117
platformio run -d examples/projects/NUCLEO-F401RE/bootloader
118+
platformio run -d examples/projects/NUCLEO-F401RE/dc_motor
119+
platformio run -d examples/projects/NUCLEO-F401RE/potentiometer
115120
# NUCLEO-F410RB
116121
platformio run -d examples/projects/NUCLEO-F410RB/button
117122
platformio run -d examples/projects/NUCLEO-F410RB/gate_serialcom
118123
platformio run -d examples/projects/NUCLEO-F410RB/inspector_serialcom
119124
platformio run -d examples/projects/NUCLEO-F410RB/bootloader
125+
platformio run -d examples/projects/NUCLEO-F410RB/dc_motor
126+
platformio run -d examples/projects/NUCLEO-F410RB/potentiometer
120127
# NUCLEO-G431KB
121128
platformio run -d examples/projects/NUCLEO-G431KB/button
122129
platformio run -d examples/projects/NUCLEO-G431KB/gate_serialcom
123130
platformio run -d examples/projects/NUCLEO-G431KB/inspector_serialcom
124131
platformio run -d examples/projects/NUCLEO-G431KB/bootloader
132+
platformio run -d examples/projects/NUCLEO-G431KB/dc_motor
133+
platformio run -d examples/projects/NUCLEO-G431KB/potentiometer
125134
# NUCLEO-G474RE
126135
platformio run -d examples/projects/NUCLEO-G474RE/button
127136
platformio run -d examples/projects/NUCLEO-G474RE/gate_serialcom
@@ -131,5 +140,8 @@ jobs:
131140
platformio run -d examples/projects/NUCLEO-F072RB/gate_serialcom
132141
platformio run -d examples/projects/NUCLEO-F072RB/inspector_serialcom
133142
platformio run -d examples/projects/NUCLEO-F072RB/bootloader
143+
platformio run -d examples/projects/NUCLEO-F072RB/button
144+
platformio run -d examples/projects/NUCLEO-F072RB/dc_motor
145+
platformio run -d examples/projects/NUCLEO-F072RB/potentiometer
134146
# SAMD21XPLAINED
135147
# ******** missing bootloader CI ********

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
[![](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Unleash%20electronic%20devices%20as%20microservices%20thanks%20to%20Luos&https://luos.io&via=Luos_io&hashtags=embeddedsystems,electronics,microservices,api)
1313
[![](https://img.shields.io/badge/LinkedIn-Share-0077B5?style=social&logo=linkedin)](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fgithub.com%2Fluos-io)
1414

15-
Version: 2.5.0
15+
Version: 2.5.1
1616

1717
# Luos Technology
1818
## The most for the developer​

engine/core/src/luos_engine.c

+6-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ typedef enum
2727
/*******************************************************************************
2828
* Variables
2929
******************************************************************************/
30-
revision_t luos_version = {.major = 2, .minor = 5, .build = 0};
30+
revision_t luos_version = {.major = 2, .minor = 5, .build = 1};
3131
package_t package_table[MAX_SERVICE_NUMBER];
3232
uint16_t package_number = 0;
3333
service_t service_table[MAX_SERVICE_NUMBER];
@@ -506,8 +506,11 @@ static void Luos_AutoUpdateManager(void)
506506
}
507507
else
508508
{
509-
// directly transmit the message in Localhost
510-
Robus_SetTxTask(service_table[i].ll_service, &updt_msg);
509+
if (Robus_IsNodeDetected() == DETECTION_OK)
510+
{
511+
// directly transmit the message in Localhost
512+
Robus_SetTxTask(service_table[i].ll_service, &updt_msg);
513+
}
511514
}
512515
service_table[i].auto_refresh.last_update = LuosHAL_GetSystick();
513516
}
@@ -607,7 +610,6 @@ error_return_t Luos_SendTimestampMsg(service_t *service, msg_t *msg, time_luos_t
607610
{
608611
// set timestamp in message
609612
Timestamp_EncodeMsg(msg, timestamp);
610-
611613
if (service == 0)
612614
{
613615
// There is no service specified here, take the first one
@@ -623,7 +625,6 @@ error_return_t Luos_SendTimestampMsg(service_t *service, msg_t *msg, time_luos_t
623625
{
624626
return FAILED;
625627
}
626-
627628
return SUCCEED;
628629
}
629630

engine/core/src/timestamp.c

+2-6
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@ void Timestamp_EncodeMsg(msg_t *msg, time_luos_t timestamp)
103103
msg->header.config = TIMESTAMP_PROTOCOL;
104104
// Timestamp is at the end of the message copy it
105105
memcpy(&msg->data[msg->header.size], &timestamp, sizeof(time_luos_t));
106-
// Add timestamp size to message size
107-
msg->header.size += sizeof(time_luos_t);
108106
}
109107

110108
/******************************************************************************
@@ -120,14 +118,14 @@ void Timestamp_ConvertToLatency(msg_t *msg)
120118
if (last_msg != msg)
121119
{
122120
// This is a new message, backup the timestamp date
123-
memcpy(&timestamp_date, &msg->data[msg->header.size - sizeof(time_luos_t)], sizeof(time_luos_t));
121+
memcpy(&timestamp_date, &msg->data[msg->header.size], sizeof(time_luos_t));
124122
// Keep the message pointer to know if we already manage this one or not.
125123
last_msg = msg;
126124
}
127125
// Compute the latency from date
128126
time_luos_t latency = timestamp_date - Timestamp_now();
129127
// Write latency on the message
130-
memcpy(&msg->data[msg->header.size - sizeof(time_luos_t)], &latency, sizeof(time_luos_t));
128+
memcpy(&msg->data[msg->header.size], &latency, sizeof(time_luos_t));
131129
}
132130

133131
/******************************************************************************
@@ -139,8 +137,6 @@ void Timestamp_ConvertToLatency(msg_t *msg)
139137
inline void Timestamp_ConvertToDate(msg_t *msg, uint64_t reception_date)
140138
{
141139
time_luos_t timestamp_latency = 0.0f;
142-
// Update msg size
143-
msg->header.size = msg->header.size - sizeof(time_luos_t);
144140
// Get latency
145141
memcpy(&timestamp_latency, &msg->data[msg->header.size], sizeof(time_luos_t));
146142
// Compute the date from latency

examples/apps/alarm_controller/alarm_controller.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ void AlarmController_Init(void)
3131
{
3232
revision_t revision = {.major = 1, .minor = 0, .build = 0};
3333
// Create App
34-
app = Luos_CreateService(AlarmController_MsgHandler, ALARM_CONTROLLER_APP, "alarm_control", revision);
34+
app = Luos_CreateService(AlarmController_MsgHandler, ALARM_CONTROLLER_APP, "alarm_control", revision);
35+
uint32_t init_timer = Luos_GetSystick();
36+
while (Luos_GetSystick() - init_timer < INIT_TIME)
37+
;
3538
Luos_Detect(app);
3639
}
3740
/******************************************************************************

examples/apps/alarm_controller/library.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
},
1010
"licence": "MIT",
1111
"dependencies": {
12-
"luos/luos_engine": "^2.5.0"
12+
"luos/luos_engine": "^2.5.1"
1313
}
1414
}

examples/apps/biometric-security/library.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
},
1010
"licence": "MIT",
1111
"dependencies": {
12-
"luos/luos_engine": "^2.5.0"
12+
"luos/luos_engine": "^2.5.1"
1313
}
1414
}

examples/apps/start_controller/library.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
},
1010
"licence": "MIT",
1111
"dependencies": {
12-
"luos/luos_engine": "^2.5.0"
12+
"luos/luos_engine": "^2.5.1"
1313
}
1414
}

examples/apps/start_controller/start_controller.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ void StartController_Init(void)
4343
{
4444
revision_t revision = {.major = 1, .minor = 0, .build = 0};
4545
// Create App
46-
app = Luos_CreateService(StartController_MsgHandler, START_CONTROLLER_APP, "start_control", revision);
46+
app = Luos_CreateService(StartController_MsgHandler, START_CONTROLLER_APP, "start_control", revision);
47+
uint32_t init_timer = Luos_GetSystick();
48+
while (Luos_GetSystick() - init_timer < INIT_TIME)
49+
;
4750
Luos_Detect(app);
4851
}
4952
/******************************************************************************

examples/projects/Arduino/bldc_simple_foc/lib/motor/library.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"build": {},
1212
"dependencies": {
1313
"askuric/Simple FOC": "^2.2.1",
14-
"luos/luos_engine": "^2.5.0"
14+
"luos/luos_engine": "^2.5.1"
1515
}
1616
}

examples/projects/Arduino/bldc_simple_foc/platformio.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ build_flags =
2121
-include node_config.h
2222
-DLUOSHAL=ATSAMD21_ARDUINO
2323
lib_deps =
24-
luos_engine@^2.5.0
24+
luos_engine@^2.5.1
2525
SimpleFOC_Motor
2626
askuric/Simple FOC@^2.2.1

examples/projects/Arduino/button/lib/button/library.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"url": "https://luos.io"
99
},
1010
"dependencies": {
11-
"luos/luos_engine": "^2.5.0"
11+
"luos/luos_engine": "^2.5.1"
1212
},
1313
"licence": "MIT"
1414
}

examples/projects/Arduino/button/platformio.ini

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ build_flags =
2424
-include node_config.h
2525
-D LUOSHAL=ATSAMD21_ARDUINO
2626
lib_deps =
27-
luos_engine@^2.5.0
27+
luos_engine@^2.5.1
2828
Button
2929

3030
[env:seed]
@@ -41,5 +41,5 @@ build_flags =
4141
-include node_config.h
4242
-D LUOSHAL=ATSAMD21_ARDUINO
4343
lib_deps =
44-
luos_engine@^2.5.0
44+
luos_engine@^2.5.1
4545
Button
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
{
2-
"name": "Fingerprint",
3-
"keywords": "robus,network,microservice,luos,operating system,os,embedded,communication,service,ST",
4-
"description": "a simple fingerprint driver",
5-
"version": "1.0.0",
6-
"licence": "MIT",
7-
"dependencies": {
8-
"luos/luos_engine": "^2.5.0",
9-
"adafruit/Adafruit Fingerprint Sensor Library": "*"
10-
}
1+
{
2+
"name": "Fingerprint",
3+
"keywords": "robus,network,microservice,luos,operating system,os,embedded,communication,service,ST",
4+
"description": "a simple fingerprint driver",
5+
"version": "1.0.0",
6+
"licence": "MIT",
7+
"dependencies": {
8+
"luos/luos_engine": "^2.5.1",
9+
"adafruit/Adafruit Fingerprint Sensor Library": "*"
10+
}
1111
}

examples/projects/Arduino/fingerprint/platformio.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ build_flags =
2222
-include node_config.h
2323
-D LUOSHAL=ATSAMD21_ARDUINO
2424
lib_deps =
25-
luos_engine@^2.5.0
25+
luos_engine@^2.5.1
2626
Fingerprint
2727
adafruit/Adafruit Fingerprint Sensor Library

examples/projects/Arduino/gate_serialcom/node_config.h

+10
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,14 @@
102102
#define PIPE_TO_LUOS_BUFFER_SIZE 1024
103103
#define LUOS_TO_PIPE_BUFFER_SIZE 2048
104104

105+
/*******************************************************************************
106+
* OTHER GATE PARAMETERS
107+
*******************************************************************************
108+
* Define | Default Value | Description
109+
* :-------------------------|------------------------------------------------------
110+
* INIT_TIME | 150 | Wait init time before first detection
111+
* ******************************************************************************/
112+
113+
#define INIT_TIME 150
114+
105115
#endif /* _NODE_CONFIG_H_ */

examples/projects/Arduino/gate_serialcom/platformio.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ lib_extra_dirs =
2727
../../../../tool_services/
2828
../../../../../
2929
lib_deps =
30-
luos_engine@^2.5.0
30+
luos_engine@^2.5.1
3131
Gate
3232
Pipe

examples/projects/Arduino/inspector_serialcom/platformio.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ lib_extra_dirs =
2727
../../../../tool_services/
2828
../../../../../
2929
lib_deps =
30-
luos_engine@^2.5.0
30+
luos_engine@^2.5.1
3131
Inspector
3232
Pipe
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
{
2-
"name": "Lcd",
3-
"keywords": "robus,network,microservice,luos,operating system,os,embedded,communication,service,ST",
4-
"description": "a simple fingerprint driver",
5-
"version": "1.0.0",
6-
"licence": "MIT",
7-
"dependencies": {
8-
"luos/luos_engine": "^2.5.0",
9-
"arduino-libraries/LiquidCrystal": "*"
10-
}
1+
{
2+
"name": "Lcd",
3+
"keywords": "robus,network,microservice,luos,operating system,os,embedded,communication,service,ST",
4+
"description": "a simple fingerprint driver",
5+
"version": "1.0.0",
6+
"licence": "MIT",
7+
"dependencies": {
8+
"luos/luos_engine": "^2.5.1",
9+
"arduino-libraries/LiquidCrystal": "*"
10+
}
1111
}

examples/projects/Arduino/lcd/platformio.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ build_flags =
2222
-include node_config.h
2323
-D LUOSHAL=ATSAMD21_ARDUINO
2424
lib_deps =
25-
luos_engine@^2.5.0
25+
luos_engine@^2.5.1
2626
Lcd
2727
arduino-libraries/LiquidCrystal

examples/projects/Arduino/led/lib/led/library.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"url": "https://luos.io"
99
},
1010
"dependencies": {
11-
"luos/luos_engine": "^2.5.0"
11+
"luos/luos_engine": "^2.5.1"
1212
},
1313
"licence": "MIT"
1414
}

examples/projects/Arduino/led/platformio.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ build_flags =
2222
-include node_config.h
2323
-D LUOSHAL=ATSAMD21_ARDUINO
2424
lib_deps =
25-
luos_engine@^2.5.0
25+
luos_engine@^2.5.1
2626
Led

examples/projects/Arduino/servo_motor/lib/Servo_motor/library.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
"licence": "MIT",
77
"dependencies": {
88
"arduino-libraries/servo": "^1.1.8",
9-
"luos/luos_engine": "^2.5.0"
9+
"luos/luos_engine": "^2.5.1"
1010
}
1111
}

examples/projects/Arduino/servo_motor/platformio.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ build_flags =
2222
-include node_config.h
2323
-D LUOSHAL=ATSAMD21_ARDUINO
2424
lib_deps =
25-
luos_engine@^2.5.0
25+
luos_engine@^2.5.1
2626
arduino-libraries/Servo@^1.1.8
2727
servo_motor

0 commit comments

Comments
 (0)