position of cycle mode change

pull/15/head
alanbjohnston 6 years ago committed by GitHub
parent c0801cedc8
commit ee9feab8e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -281,9 +281,6 @@ int main(int argc, char *argv[]) {
config_file = fopen("sim.cfg","r");
}
if (cycle == ON)
mode = (reset_count) % 3; // alternate between the three modes
char* cfg_buf[100];
fscanf(config_file, "%s %d", call, &reset_count);
fclose(config_file);
@ -291,6 +288,9 @@ int main(int argc, char *argv[]) {
reset_count = (reset_count + 1) % 0xffff;
if (cycle == ON)
mode = (reset_count) % 3; // alternate between the three modes
config_file = fopen("sim.cfg","w");
fprintf(config_file, "%s %d", call, reset_count);
fclose(config_file);

Loading…
Cancel
Save

Powered by TurnKey Linux.