Skip to content

Commit

Permalink
database: forward rate limit to FrameRate.DRVH.
Browse files Browse the repository at this point in the history
Both AcquirePeriod and FrameRate can be used to define frame rate. Keep
their limits consistent by forwarding the inverse of period limit to the
FrameRate record.

To keep backward compatibility, the frame rate is computed based on the
value of the AcquirePeriod.DRVL. Changing that at runtime requires
reprocessing AcquirePeriodLimitFwd to forward to FrameRate.DRVH.
  • Loading branch information
henriquesimoes committed Apr 11, 2024
1 parent 56262ff commit 4a14868
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions CameraApp/Db/limits.db
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@ record(bo, "$(P)$(R)FrameRateEnable") {
field(VAL, 1)
}

record(calc, $(P)$(R)FrameRateLimit) {
field(DESC, "Compute frame rate limit from period")
field(INPA, "$(P)$(R)AcquirePeriod.DRVL")
field(CALC, "1 / A")
field(FLNK, "$(P)$(R)FrameRateLimitFwd")
}

record(ao, "$(P)$(R)FrameRateLimitFwd") {
field(DESC, "Forward limit to FrameRate.DRVH")
field(PINI, "YES")
field(OMSL, "closed_loop")
field(DOL, "$(P)$(R)FrameRateLimit PP")
field(OUT, "$(P)$(R)FrameRate.DRVH NPP")
}

record(ao, "$(P)$(R)FrameRate") {
field(DRVL, "0")
}

record(ao, "$(P)$(R)AcquirePeriod") {
field(DRVL, "$(ACQUIRE_PERIOD_DRVL=0)")
field(DRVH, "inf")
Expand Down

0 comments on commit 4a14868

Please sign in to comment.