Skip to content
Snippets Groups Projects
Commit 36805a2d authored by Michael DM Dryden's avatar Michael DM Dryden
Browse files

Sends comment with RTC value each second during preconditioning to keep serial connection alive.

parent d11b014f
Branches
Tags
No related merge requests found
......@@ -237,6 +237,8 @@ void precond(int16_t v1, uint16_t t1, int16_t v2, uint16_t t2){ //assumes potent
* @param t2 Second duration (s).
*/
uint16_t time_old = 0;
while (RTC.STATUS & RTC_SYNCBUSY_bm);
RTC.PER = 65535;
while (RTC.STATUS & RTC_SYNCBUSY_bm);
......@@ -259,10 +261,15 @@ void precond(int16_t v1, uint16_t t1, int16_t v2, uint16_t t2){ //assumes potent
goto aborting;
}
}
if (time_old != RTC.CNT){
time_old = RTC.CNT;
printf("#%u\n\r",time_old);
}
}
}
up = 1;
time_old = 0;
if (v2 > 0){
max5443_set_voltage1(v2);
......@@ -277,6 +284,10 @@ void precond(int16_t v1, uint16_t t1, int16_t v2, uint16_t t2){ //assumes potent
goto aborting;
}
}
if (time_old != RTC.CNT){
time_old = RTC.CNT;
printf("#%u\n\r",time_old);
}
}
}
......
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