Skip to content

Commit b5470b8

Browse files
author
QL
committed
6.2.0
1 parent 4f74bcd commit b5470b8

File tree

17 files changed

+270
-243
lines changed

17 files changed

+270
-243
lines changed

libraries/qpn_avr/examples/blinky/.blinky

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<session version="4.0.3">
2+
<session version="4.1.2">
33
<item name="license">GPL</item>
44
<group name="locked"/>
55
<group name="settings">
@@ -9,8 +9,8 @@
99
<item name="backups">0</item>
1010
</group>
1111
<group name="windows">
12-
<item id=".::blinky.ino">0,0,800,445</item>
13-
<item id="AOs::Blinky::SM">0,0,892,660,*</item>
12+
<item id=".::blinky.ino">-225,0,800,445</item>
13+
<item id="AOs::Blinky::SM">0,0,575,407,*</item>
1414
</group>
1515
<group name="search">
1616
<item name="options">4129280</item>

libraries/qpn_avr/examples/blinky/blinky.ino

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
/*****************************************************************************
1+
/*$file${.::blinky.ino} ####################################################*/
2+
/*
23
* Model: blinky.qm
3-
* File: ./blinky.ino
4+
* File: ${.::blinky.ino}
45
*
5-
* This code has been generated by QM tool (see state-machine.com/qm).
6+
* This code has been generated by QM tool (https://state-machine.com/qm).
67
* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
78
*
89
* This program is open source software: you can redistribute it and/or
@@ -13,18 +14,14 @@
1314
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
1415
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1516
* for more details.
16-
*****************************************************************************/
17-
/*${.::blinky.ino} .........................................................*/
17+
*/
18+
/*$endhead${.::blinky.ino} #################################################*/
1819
#include "qpn.h" // QP-nano framework
1920
#include "Arduino.h" // Arduino API
2021

2122
//============================================================================
2223
// declare all AO classes...
23-
24-
#if ((QP_VERSION < 591) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8)))
25-
#error qpn version 5.9.1 or higher required
26-
#endif
27-
24+
/*$declare${AOs::Blinky} ###################################################*/
2825
/*${AOs::Blinky} ...........................................................*/
2926
typedef struct Blinky {
3027
/* protected: */
@@ -35,7 +32,7 @@ typedef struct Blinky {
3532
static QState Blinky_initial(Blinky * const me);
3633
static QState Blinky_off(Blinky * const me);
3734
static QState Blinky_on(Blinky * const me);
38-
35+
/*$enddecl${AOs::Blinky} ###################################################*/
3936
//...
4037

4138
// AO instances and event queue buffers for them...
@@ -110,10 +107,15 @@ void Q_onAssert(char const Q_ROM * const file, int line) {
110107

111108
//============================================================================
112109
// define all AO classes (state machine)...
110+
/*$define${AOs::Blinky} ####################################################*/
111+
/* Check for the minimum required QP version */
112+
#if ((QP_VERSION < 601) || (QP_VERSION != ((QP_RELEASE^4294967295U) % 0x3E8)))
113+
#error qpn version 6.0.1 or higher required
114+
#endif
113115
/*${AOs::Blinky} ...........................................................*/
114116
/*${AOs::Blinky::SM} .......................................................*/
115117
static QState Blinky_initial(Blinky * const me) {
116-
/* ${AOs::Blinky::SM::initial} */
118+
/*${AOs::Blinky::SM::initial} */
117119
QActive_armX((QActive *)me, 0U,
118120
BSP_TICKS_PER_SEC/2U, BSP_TICKS_PER_SEC/2U);
119121
return Q_TRAN(&Blinky_off);
@@ -122,13 +124,13 @@ static QState Blinky_initial(Blinky * const me) {
122124
static QState Blinky_off(Blinky * const me) {
123125
QState status_;
124126
switch (Q_SIG(me)) {
125-
/* ${AOs::Blinky::SM::off} */
127+
/*${AOs::Blinky::SM::off} */
126128
case Q_ENTRY_SIG: {
127129
digitalWrite(LED_L, LOW);
128130
status_ = Q_HANDLED();
129131
break;
130132
}
131-
/* ${AOs::Blinky::SM::off::Q_TIMEOUT} */
133+
/*${AOs::Blinky::SM::off::Q_TIMEOUT} */
132134
case Q_TIMEOUT_SIG: {
133135
status_ = Q_TRAN(&Blinky_on);
134136
break;
@@ -144,13 +146,13 @@ static QState Blinky_off(Blinky * const me) {
144146
static QState Blinky_on(Blinky * const me) {
145147
QState status_;
146148
switch (Q_SIG(me)) {
147-
/* ${AOs::Blinky::SM::on} */
149+
/*${AOs::Blinky::SM::on} */
148150
case Q_ENTRY_SIG: {
149151
digitalWrite(LED_L, HIGH);
150152
status_ = Q_HANDLED();
151153
break;
152154
}
153-
/* ${AOs::Blinky::SM::on::Q_TIMEOUT} */
155+
/*${AOs::Blinky::SM::on::Q_TIMEOUT} */
154156
case Q_TIMEOUT_SIG: {
155157
status_ = Q_TRAN(&Blinky_off);
156158
break;
@@ -162,6 +164,5 @@ static QState Blinky_on(Blinky * const me) {
162164
}
163165
return status_;
164166
}
165-
167+
/*$enddef${AOs::Blinky} ####################################################*/
166168
//...
167-

libraries/qpn_avr/examples/blinky/blinky.qm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<model version="4.0.3" links="0">
2+
<model version="4.1.2" links="0">
33
<documentation>This is the Blinky example for the Arduino-UNO board, which blinks the on-board LED (L) once per second. The example demonstrates:
44

55
1. One active object class &quot;Blinky&quot; (inside the package &quot;AOs&quot;)

libraries/qpn_avr/examples/dpp/.dpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<session version="4.0.3">
2+
<session version="4.1.2">
33
<item name="license">GPL</item>
44
<group name="locked"/>
55
<group name="settings">
@@ -9,9 +9,9 @@
99
<item name="backups">0</item>
1010
</group>
1111
<group name="windows">
12-
<item id=".::dpp.ino">0,0,800,445</item>
13-
<item id="AOs::Philo::SM">0,0,892,660,*</item>
14-
<item id="AOs::Table::SM">252,0,640,480</item>
12+
<item id=".::dpp.ino">-225,0,800,445</item>
13+
<item id="AOs::Philo::SM">0,0,575,407,*</item>
14+
<item id="AOs::Table::SM">-65,0,640,480</item>
1515
</group>
1616
<group name="search">
1717
<item name="options">4129280</item>

0 commit comments

Comments
 (0)