gv_fsm 0.2.9 → 0.2.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19016ba84adc54b46d0c52e6dffcd4024f3626a32ada32830cdf3a8e094a3a35
4
- data.tar.gz: 32f84664395d90c58da54bf5b8add1a8a06bd0f0901ffd1947b9f81e713df26e
3
+ metadata.gz: bf5e9e3cf0f82f27179188c0a3e994b2114278d723f4df2530b59a5ee87bdb72
4
+ data.tar.gz: 6dda52c8b001d8043e888d139cca35939fb5682acb93c00f1e2a9a7373343b3b
5
5
  SHA512:
6
- metadata.gz: 5896400ccad2e6a1091f20aa32d3739bbe45c3b87fe5ed4501a4254235e3acf6a0d09561789d53686939fafa5d298de84567475a6bcca23b8c0b5375242f4f19
7
- data.tar.gz: fdc81c9081b5c83e4842ce864fb4b5babcdfde5cc03936c3cad0eb64f8a078af517b3da50fea7bc1f1a8027c36b2678a16d3d537118cf1280e7b994b405a24a6
6
+ metadata.gz: 3fe7b3e14362c3a35692785df7fc35b1756575499b94de2c2441828096c5d479b15bfa5736ede6d7691908f646edb7f625b385b877a53d7423a27fab41adbf6b
7
+ data.tar.gz: d99ed400cdc9ac9f13831952059e9b9ccd352bfd8b55f5fdc570b1667070cb6c1181ae4942e69c732eb6159639928e46f57debd3e05db969eaa99b9cc0e91a75
data/lib/gv_fsm.rb CHANGED
@@ -48,7 +48,7 @@ module GV_FSM
48
48
  return nil
49
49
  end
50
50
  @matrix = Matrix.zero(n, n)
51
- @description = g.name
51
+ @description = g.name unless @description
52
52
  i = 0
53
53
  g.each_node do |id|
54
54
  n = g.get_node(id)
data/lib/templates.rb CHANGED
@@ -23,8 +23,8 @@ module GV_FSM
23
23
 
24
24
  HH =<<~EOH
25
25
  <% if !@ino then %>
26
- #ifndef <%= @cname.upcase %>_H
27
- #define <%= @cname.upcase %>_H
26
+ #ifndef <%= File::basename(@cname).upcase %>_H
27
+ #define <%= File::basename(@cname).upcase %>_H
28
28
  #include <stdlib.h>
29
29
  <% else %>
30
30
  #include <arduino.h>
@@ -92,7 +92,7 @@ module GV_FSM
92
92
  <% end %>
93
93
 
94
94
  // state manager
95
- <%= @prefix %>state_t <%= @prefix %>run_state(<%= @prefix %>state_t cur_state, state_data_t *data);
95
+ <%= @prefix %>state_t <%= @prefix %>run_state(<%= @prefix %>state_t cur_state, <%= @prefix %>state_data_t *data);
96
96
 
97
97
  <% if !@ino then %>
98
98
  #endif
@@ -108,7 +108,7 @@ module GV_FSM
108
108
  <% else %>
109
109
  <% if @syslog then log = :ino end %>
110
110
  <% end %>
111
- #include "<%= @cname %>.h"
111
+ #include "<%= File::basename(@cname) %>.h"
112
112
 
113
113
  <% placeholder = "Your Code Here" %>
114
114
  // SEARCH FOR <%= placeholder %> FOR CODE INSERTION POINTS!
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module GV_FSM
2
- VERSION = "0.2.9"
2
+ VERSION = "0.2.10"
3
3
  end
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.2.9
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paolo Bosetti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-12 00:00:00.000000000 Z
11
+ date: 2022-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-graphviz