gv_fsm 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/templates.rb +4 -4
- data/lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 784139036e73fde8dd29fd8cc87228b2829241cdea0a8398cdf0cbc31d4ab385
|
4
|
+
data.tar.gz: 4d2ec2d3506a652e9db040fc4a58eb669052813837e310a3349393763a7ba207
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b89e1ee3e0aadde8e3b36085759696ccb27701b02cd895f93b1e0007f238d7415ae93f5f19e47fad99b7002c2df28ff496044a5c805cf9d6c36f3679b96acd52
|
7
|
+
data.tar.gz: aa06c8df94a679aaeae10eb635a10adceacfc3e3738ed03481d75941c106da4ef91ede9a59f042f8430a62f6b4fa3acfd7d2187dc3d33fde199c11ac797c4425
|
data/lib/templates.rb
CHANGED
@@ -49,7 +49,7 @@ module GV_FSM
|
|
49
49
|
} <%= @prefix %>state_t;
|
50
50
|
|
51
51
|
// State human-readable names
|
52
|
-
extern const char
|
52
|
+
extern const char *<%= @prefix %>state_names[];
|
53
53
|
|
54
54
|
<% if transition_functions_list.count > 0 then %>
|
55
55
|
// State function and state transition prototypes
|
@@ -128,7 +128,7 @@ module GV_FSM
|
|
128
128
|
|
129
129
|
// GLOBALS
|
130
130
|
// State human-readable names
|
131
|
-
const char
|
131
|
+
const char *<%= @prefix %>state_names[] = {<%= states_list.map {|sn| '"'+sn+'"'}.join(", ") %>};
|
132
132
|
|
133
133
|
// List of state functions
|
134
134
|
<% fw = state_functions_list.max {|a, b| a.length <=> b.length}.length %>
|
@@ -196,10 +196,10 @@ module GV_FSM
|
|
196
196
|
break;
|
197
197
|
default:
|
198
198
|
<% if log == :syslog then %>
|
199
|
-
syslog(LOG_WARNING, "[FSM] Cannot pass from <%= s[:id] %> to %s, remaining in this state", state_names[next_state]);
|
199
|
+
syslog(LOG_WARNING, "[FSM] Cannot pass from <%= s[:id] %> to %s, remaining in this state", <%= @prefix %>state_names[next_state]);
|
200
200
|
<% elsif log == :ino then %>
|
201
201
|
Serial.print("[FSM] Cannot pass from <%= s[:id] %> to ");
|
202
|
-
Serial.print(state_names[next_state]);
|
202
|
+
Serial.print(<%= @prefix %>state_names[next_state]);
|
203
203
|
Serial.println(", remaining in this state");
|
204
204
|
<% end %>
|
205
205
|
next_state = <%= @prefix.upcase %>NO_CHANGE;
|
data/lib/version.rb
CHANGED