Commit fcbe242b authored by Maciej Lipinski's avatar Maciej Lipinski

HAL: removed unneeded code from the old Tom's code (was already commented)

parent ef32c120
......@@ -113,8 +113,6 @@ static void tx_fsm_display_summary(void);
// static int read_ppsi_instances(void); // Tom's not needed
//static int try_open_ppsi_shmem(void);// Tom's not needed
//TODO-ML- Tom's stuff, seems not needed any more
// static int ppsi_crap_valid = 0;
/* path to the file where Low Phase Drift calib parameters are stored */
static char *calibration_file_name = "/update/tx_phase_cal.conf";
......@@ -807,16 +805,6 @@ void hal_port_update_all()
wrs_shm_write(hal_shmem_hdr, WRS_SHM_WRITE_END);
}
//TODO-ML:- it does not seem to be needed anymore
/* try to open ppsi's shmem */
// ppsi_crap_valid = 0;
// if (try_open_ppsi_shmem())
// {
// if (read_ppsi_instances())
// ppsi_crap_valid = 1;
// }
///////////
if (libwr_tmo_expired(&update_link_leds_tmo)) {
/* update color of the link LEDs */
update_link_leds();
......@@ -1005,15 +993,6 @@ static void update_sync_leds(void)
int i;
struct hal_port_state *port=&ports[0];
//TODO-ML rather not needed
// if (!ppsi_crap_valid)
// {
// for (i = 0; i < HAL_MAX_PORTS; i++)
// set_led_synced(i, 0);
// return;
// }
///////////////
for (i = 0; i < HAL_MAX_PORTS; i++) {
/* Check:
......@@ -1543,90 +1522,3 @@ static void tx_fsm_display_summary(void)
}
}
//TODO: ML-this is wrong??
// static int read_ppsi_instances(void)
// {
// unsigned ii;
// unsigned retries = 0;
//
// /* read data, with the sequential lock to have all data consistent */
// while (1)
// {
// ii = wrs_shm_seqbegin(ppsi_head);
// memcpy(&ppsi_instances_local, ppsi_instances,
// ppsi_nlinks * sizeof(*ppsi_instances));
// retries++;
// if (retries > 100)
// return -1;
// if (!wrs_shm_seqretry(ppsi_head, ii))
// break; /* consistent read */
// }
//
// return 0;
// }
//TODO: ML-this is wrong
// static int try_open_ppsi_shmem(void)
// {
// int ret;
// struct pp_globals *ppg;
// static int open_error;
//
// if (ppsi_servo && ppsi_instances)
// {
// /* shmem already opened */
// return 1;
// }
//
// if (!ppsi_head)
// {
// ret = wrs_shm_get_and_check(wrs_shm_ptp, &ppsi_head);
// if (ret == WRS_SHM_OPEN_FAILED)
// {
// if (open_error > 1000000)
// pr_error("Unable to open PPSI's shm !\n");
// else
// open_error++;
// return 0;
// }
// if (ret == WRS_SHM_WRONG_VERSION)
// {
// pr_error("Unable to read PPSI's version!\n");
// return 0;
// }
// if (ret == WRS_SHM_INCONSISTENT_DATA)
// {
// pr_error("Unable to read consistent data from PPSI's "
// "shmem!\n");
// return 0;
// }
// }
//
// /* check ppsi's shm version */
// if (ppsi_head->version != WRS_PPSI_SHMEM_VERSION)
// {
// pr_error("Unknown PPSI's shm version %i (known is %i)\n",
// ppsi_head->version, WRS_PPSI_SHMEM_VERSION);
// return 0;
// }
// ppg = (void *)ppsi_head + ppsi_head->data_off;
//
// /* there is an assumption that there is only one servo in ppsi! */
// ppsi_servo = wrs_shm_follow(ppsi_head, ppg->global_ext_data);
// if (!ppsi_servo)
// {
// pr_error("Cannot follow ppsi_servo in shmem.\n");
// return 0;
// }
//
// ppsi_instances = wrs_shm_follow(ppsi_head, ppg->pp_instances);
// if (!ppsi_instances)
// {
// pr_error("Cannot follow pp_instances in shmem.\n");
// return 0;
// }
//
// ppsi_nlinks = ppg->nlinks;
//
// return 1;
// }
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