/* Random Color Display for RVController
 * A product of Advanced Mesecons Devices, a Cheapie Systems company
 * This is free and unencumbered software released into the public domain.
 * See http://unlicense.org/ for more information */

#include "rvcontroller-ecalls.h"

char color[] = "123456";
char channel[] = "A1";
char chars[] = "0123456789ABCDEF";

void randomize() {
	for (int i=0;i<=5;i++) {
		color[i] = chars[randomint(0,15)];
	}
}

void main(void) {
	for (int y=0;y<=5;y++) {
		channel[1] = '1' + y;
		for (int x=0;x<=19;x++) {
			channel[0] = 'A' + x;
			randomize();
			digiline_send(channel,color);
		}
	}

	for (;;) {
		channel[0] = randomint('A','T');
		channel[1] = randomint('1','6');
		randomize();
		digiline_send(channel,color);
	}
}
