Skip to content

Commit c0d632b

Browse files
authored
Allow documenting struct in @defVariable (#642)
Also maxlog 1 for updateVariableSolverData!
1 parent e30c7ed commit c0d632b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/services/DFGVariable.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ DFG.@defVariable Pose2 3 (:Euclid, :Euclid, :Circular)
7777
macro defVariable(structname, dimension::Int, manifolds)#::Vararg{Symbol})#NTuple{dimension, Symbol})
7878
# :(struct $structname <: InferenceVariable end)
7979
return esc(quote
80-
struct $structname <: InferenceVariable end
80+
Base.@__doc__ struct $structname <: InferenceVariable end
8181
DistributedFactorGraphs.getDimension(::$structname) = $dimension
8282
DistributedFactorGraphs.getManifolds(::$structname) = $manifolds
8383
end)
@@ -521,7 +521,7 @@ function updateVariableSolverData!(dfg::AbstractDFG,
521521

522522
# TODO not very clean
523523
if vnd.solveKey != solveKey
524-
@warn "updateVariableSolverData with solveKey parameter might change in the future, see DFG #565"
524+
@warn("updateVariableSolverData with solveKey parameter might change in the future, see DFG #565. Future warnings are suppressed", maxlog=1)
525525
usevnd = useCopy ? deepcopy(vnd) : vnd
526526
usevnd.solveKey = solveKey
527527
return updateVariableSolverData!(dfg, variablekey, usevnd, useCopy, fields, verbose)

0 commit comments

Comments
 (0)