gv_fsm 0.3.4 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gv_fsm.rb +4 -4
- data/lib/templates.rb +6 -0
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86b23438e750da00df1eeb91db559d2176303a4a9c543fdb6acf471d5d112571
|
4
|
+
data.tar.gz: cb3c1ef9e8d2fe0fdf84740539425a9aa8aca3d0358de6ae2b5a69c209d4dfd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 946b67acdc3dd2e435bdcda6588c2df81f4548d89003db424634b5d27e45e7a7b2698cd7583e5a51e5c1814dd5cdb5042fd719bd27d37c831dde30354935172f
|
7
|
+
data.tar.gz: 83b6474365979c04ea29346acc518746ee1d760eb4b144da251e2f3816956e488d68ebf4d52c7e4d234f3dfe92a14ad746f7b37d67c743078e06a68deb885177
|
data/lib/gv_fsm.rb
CHANGED
@@ -144,8 +144,8 @@ module GV_FSM
|
|
144
144
|
ext = @ino ? "cpp" : "c"
|
145
145
|
fname = "#{filename}.#{ext}"
|
146
146
|
File.open(fname, "w") do |f|
|
147
|
-
f.puts ERB.new(HEADER,
|
148
|
-
f.puts ERB.new(CC,
|
147
|
+
f.puts ERB.new(HEADER, trim_mode: "<>").result(binding)
|
148
|
+
f.puts ERB.new(CC, trim_mode: "<>").result(binding)
|
149
149
|
end
|
150
150
|
return fname
|
151
151
|
end
|
@@ -153,8 +153,8 @@ module GV_FSM
|
|
153
153
|
def generate_h(filename = @cname)
|
154
154
|
fname = "#{filename}.h"
|
155
155
|
File.open(fname, "w") do |f|
|
156
|
-
f.puts ERB.new(HEADER,
|
157
|
-
f.puts ERB.new(HH,
|
156
|
+
f.puts ERB.new(HEADER, trim_mode: "<>").result(binding)
|
157
|
+
f.puts ERB.new(HH, trim_mode: "<>").result(binding)
|
158
158
|
end
|
159
159
|
return fname
|
160
160
|
end
|
data/lib/templates.rb
CHANGED
@@ -25,6 +25,9 @@ module GV_FSM
|
|
25
25
|
<% if !@ino then %>
|
26
26
|
#ifndef <%= File::basename(@cname).upcase %>_H
|
27
27
|
#define <%= File::basename(@cname).upcase %>_H
|
28
|
+
#ifdef __cplusplus
|
29
|
+
extern "C" {
|
30
|
+
#endif
|
28
31
|
#include <stdlib.h>
|
29
32
|
<% else %>
|
30
33
|
#include <arduino.h>
|
@@ -95,7 +98,10 @@ module GV_FSM
|
|
95
98
|
<%= @prefix %>state_t <%= @prefix %>run_state(<%= @prefix %>state_t cur_state, <%= @prefix %>state_data_t *data);
|
96
99
|
|
97
100
|
<% if !@ino then %>
|
101
|
+
#ifdef __cplusplus
|
102
|
+
}
|
98
103
|
#endif
|
104
|
+
#endif // <%= File::basename(@cname).upcase %>_H
|
99
105
|
<% end %>
|
100
106
|
EOH
|
101
107
|
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gv_fsm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paolo Bosetti
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-graphviz
|