void telemReadbackSamples(unsigned long numSamples, unsigned int src_addr) { int delaytime_ms = READBACK_DELAY_TIME_MS; unsigned long i = 0; //will actually be the same as the sampleIndex telemStruct_t sampleData; //This is a terrible hack to avoid bus conflicts. //TODO: find source of bus problems and fix DisableIntT1; DisableIntT5; for (i = 0; i < numSamples; i++) { //Retireve data from flash telemGetSample(i, sizeof (sampleData), (unsigned char*) (&sampleData)); //Reliable send, with linear backoff do { //debugpins1_set(); telemSendDataDelay(&sampleData, delaytime_ms, src_addr); //Linear backoff delaytime_ms += 0; //debugpins1_clr(); } while (trxGetLastACKd() == 0); delaytime_ms = READBACK_DELAY_TIME_MS; } //This is a terrible hack to avoid bus conflicts. //TODO: find source of bus problems and fix EnableIntT1; EnableIntT5; }
void telemReadbackSamples(unsigned long numSamples) { unsigned long i = 0; //will actually be the same as the sampleIndex LED_GREEN = 1; //Disable motion interrupts for readback telemStruct_t sampleData; DisableIntT1; for (i = 0; i < numSamples; i++) { //Retireve data from flash telemGetSample(i, sizeof (sampleData), (unsigned char*) (&sampleData)); telemSendDataDelay(&sampleData); } EnableIntT1; LED_GREEN = 0; }