Skip to content

Commit 5e23d50

Browse files
authored
Merge pull request #39 from JuliaRobotics/feat/3Q20/verbxtra
add verboseXtra
2 parents d4c9d05 + 274b420 commit 5e23d50

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name = "FunctionalStateMachine"
22
uuid = "3e9e306e-7e3c-11e9-12d2-8f8f67a2f951"
33
keywords = ["state machine"]
44
desc = "Functional state machine with stepping and visualization tools."
5-
version = "0.2.8"
5+
version = "0.2.9"
66

77
[deps]
88
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"

src/StateMachine.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,15 @@ function (st::StateMachine{T})( userdata::T=nothing,
6060
breakafter::Function=exitStateMachine,
6161
verbose::Bool=false,
6262
verbosefid=stdout,
63+
verboseXtra="",
6364
iterlimit::Int=-1,
6465
injectDelayBefore::Union{Nothing,Pair{<:Function, <:Real}}=nothing,
6566
recordhistory::Bool=false,
6667
housekeeping_cb::Function=(st)->() ) where {T}
6768
#
6869
st.iter += 1
6970
# verbose print to help debugging
70-
!verbose ? nothing : println(verbosefid, "FSM $(st.name), iter=$(st.iter) -- $(st.next)")
71+
!verbose ? nothing : println(verbosefid, "FSM $(st.name), iter=$(st.iter) -- $(st.next), $(verboseXtra)")
7172
# early exit plumbing
7273
retval = st.next != breakafter && (iterlimit == -1 || st.iter < iterlimit)
7374
# record steps for later

0 commit comments

Comments
 (0)