Skip to content

Commit 6ece237

Browse files
committed
Minor updates.
1 parent 5752049 commit 6ece237

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

app/dmved.f90

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ integer function run(app, tty) result(rc)
294294
! Fill VE.Direct protocol frame.
295295
call dm_ve_frame_next(frame, byte, eor, finished, valid)
296296

297+
! VE.Direct block finished.
297298
if (finished) then
298299
if (valid) then
299300
epoch_now = dm_time_unix()
@@ -316,6 +317,7 @@ integer function run(app, tty) result(rc)
316317
cycle tty_loop
317318
end if
318319

320+
! VE.Direct frame finished.
319321
if (eor) then
320322
if (frame%label == 'BMV') cycle tty_loop ! Ignore deprecated model description.
321323
if (frame%label == 'SER#') cycle tty_loop ! Ignore serial number field.
@@ -325,6 +327,7 @@ integer function run(app, tty) result(rc)
325327
call logger%warning(dm_ve_error_message(code), error=E_SENSOR)
326328
end if
327329

330+
! VE.Direct frame to response.
328331
call dm_ve_frame_read(frame, response, field_type, error=rc)
329332

330333
if (dm_is_error(rc)) then

guide/guide.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2738,7 +2738,7 @@ Start <<dmrecv>> to receive observations and output them to _stdout_ in JSONL
27382738
format:
27392739

27402740
....
2741-
$ dmrecv --name dmrecv --type observ --format jsonl --output -
2741+
$ dmrecv --name dmrecv --type observ --format jsonl
27422742
....
27432743

27442744
Start *dmved* to read and forward status data from the connected MPPT every 60

src/dm_request.f90

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,11 @@ pure elemental logical function dm_request_is_valid(request, timestamp) result(v
216216
if (.not. dm_string_is_printable(request%delimiter)) return
217217
if (.not. dm_string_is_printable(request%pattern)) return
218218

219-
if (request%delay < 0) return
220219
if (.not. dm_error_is_valid(request%error)) return
220+
221+
if (request%delay < 0) return
221222
if (request%retries < 0) return
222-
if (request%state < 0) return
223+
if (request%state < 0) return
223224
if (request%timeout < 0) return
224225

225226
if (request%nresponses < 0 .or. request%nresponses > REQUEST_MAX_NRESPONSES) return

src/dm_tty.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -721,8 +721,8 @@ integer function dm_tty_write_request(tty, request) result(rc)
721721
use :: dm_ascii, only: dm_ascii_unescape
722722
use :: dm_request
723723

724-
type(tty_type), intent(inout) :: tty !! TTY type.
725-
type(request_type), intent(inout) :: request !! Request type
724+
type(tty_type), intent(inout) :: tty !! TTY type.
725+
type(request_type), intent(inout) :: request !! Request type
726726

727727
character(len=REQUEST_REQUEST_LEN) :: raw ! Raw request (unescaped).
728728

0 commit comments

Comments
 (0)