Commit 0250bb3b authored by Alessandro Rubini's avatar Alessandro Rubini Committed by Adam Wujek

white-rabbit: change the wr-servo string being reported

When the servo is tracking, it oscillates between two states:
track_phase and wait_sync_idle.  Users should better not see
the "wait_sync_idle", becuase it look problematic but it is not
(earlier, the state was entered in the same way but not shown).

We are going to change the thing, and speed-up the servo as a side
effect, but meanwhile we'd better do this so ppsi's master can be
picked as the wrpc-sw submodule

Please note that state reported as number and string via SNMP may be
inconsistent.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 4972c956
......@@ -242,7 +242,7 @@ int wr_servo_update(struct pp_instance *ppi)
uint64_t big_delta_fix;
uint64_t delay_ms_fix;
static int errcount;
int remaining_offset;
int i, remaining_offset;
TimeInternal ts_offset, ts_offset_hw /*, ts_phase_adjust */;
......@@ -400,7 +400,11 @@ int wr_servo_update(struct pp_instance *ppi)
}
/* update string state name */
strcpy(s->servo_state_name, servo_name[s->state]);
if (s->state == WR_WAIT_SYNC_IDLE)
i = s->next_state;
else
i = s->state;
strcpy(s->servo_state_name, servo_name[i]);
/* shmem unlock */
wrs_shm_write(ppsi_head, WRS_SHM_WRITE_END);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment