Skip to content

Commit

Permalink
Merge pull request #3 from gsalinas/remove-text-colors
Browse files Browse the repository at this point in the history
Remove text colors
  • Loading branch information
kagalenko-m-b authored Jun 1, 2023
2 parents e66cbb3 + 69d82a3 commit 8836bdf
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/LibModbus.jl
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,8 @@ function Base.show(io::IO, ctx::ModbusContext)
str = "ModbusContext"
end
if !ctx.valid
color = :red
str *= "(NULL)"
elseif ctx isa RtuContext
color = :green
str *= "(serial_port $(ctx.serial_port), baud $(ctx.baud), "*
"parity $(ctx.parity), data_bits $(ctx.data_bits), "*
"stop_bits $(ctx.stop_bits))"
Expand All @@ -181,7 +179,7 @@ function Base.show(io::IO, ctx::ModbusContext)
else
str *= "()"
end
printstyled(io, str; color)
print(io, str)
end

function Base.setproperty!(ctx::ModbusContext, name::Symbol, x)
Expand Down

0 comments on commit 8836bdf

Please sign in to comment.