Commit d5cb5b75 authored by Adam Wujek's avatar Adam Wujek

userspace/ppsi: uplift

servo_state_name is no longer present as string in servo
Signed-off-by: 's avatarAdam Wujek <dev_public@wujek.eu>
parent 62b4fe8d
Pipeline #4668 failed with stage
in 7 seconds
Subproject commit 851c424498e6dd1d3091ba1fcc11792e2973c14c
Subproject commit 4b79a4605772c9e44ee4d341d1f992d76ae8aba4
#include "wrsSnmp.h"
#include "snmp_shmem.h"
#include "wrsPtpDataTable.h"
#include "../proto-ext-common/wrh-servo_state_name.h"
struct wrsPtpDataTable_s wrsPtpDataTable_array[WRS_MAX_N_SERVO_INSTANCES];
......@@ -132,9 +133,8 @@ time_t wrsPtpDataTable_data_fill(unsigned int *n_rows)
sizeof(ClockIdentity));
/* wrsPtpServoState */
strncpy(ptp_a[si].wrsPtpServoState,
ppsi_servo->servo_state_name,
sizeof(ppsi_servo->servo_state_name));
strcpy(ptp_a[si].wrsPtpServoState,
wrh_servo_state_name[ppsi_servo->state]);
/* wrsPtpServoStateN */
if ( ppsi_i->extState == PP_EXSTATE_DISABLE
......
......@@ -17,7 +17,7 @@
#include <minipc.h>
#include <signal.h>
#include <ppsi-wrs.h>
#include "../proto-ext-common/wrh-servo_state_name.h"
#include "term.h"
#include <time_lib.h>
......@@ -655,8 +655,8 @@ void init_shm(void)
ppg = (void *)ppsi_head + ppsi_head->data_off;
/* Access to ppg arch data */
if ( ppg->arch_data!=NULL)
ppg_arch=wrs_shm_follow(ppsi_head, ppg->arch_data);
if ( ppg->arch_glbl_data!=NULL)
ppg_arch=wrs_shm_follow(ppsi_head, ppg->arch_glbl_data);
/* Access to defaultDS data */
defaultDS = wrs_shm_follow(ppsi_head, ppg->defaultDS);
......@@ -1063,7 +1063,7 @@ void show_servo(struct inst_servo_t *servo, int alive)
term_cprintf(C_WHITE, "%s:%s: %s%s\n",
servo->ppi->cfg.iface_name,
pe_info->ext_name,
servo->servo_snapshot.servo_state_name,
wrh_servo_state_name[servo->servo_snapshot.state],
servo->servo_snapshot.flags & PP_SERVO_FLAG_WAIT_HW ?
" (wait for hw)" : "");
}
......@@ -1177,7 +1177,7 @@ void show_servo(struct inst_servo_t *servo, int alive)
/* printf("rx:");*/
/* printf("tx:");*/
printf("sv:%d ", servo->servo_snapshot.flags & PP_SERVO_FLAG_VALID ? 1 : 0);
printf("ss:'%s' ", servo->servo_snapshot.servo_state_name);
printf("ss:'%s' ", wrh_servo_state_name[servo->servo_snapshot.state]);
/* printf("aux:");*/
printf("md:%s ", timeIntervalToString(servo->meanDelay,buf));
printf("dms:%s ", timeToString(&servo->servo_snapshot.delayMS,buf));
......
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