Exemplo n.º 1
0
void OdyPatch::readPatch(unsigned char patchNum)
{
	unsigned int startAddr = (unsigned int)PATCH_SIZE * patchNum;
	unsigned int addr = 0;
	unsigned char i,j;
	unsigned char data[PATCH_SIZE];
	readMemory((void*)data,(const void*)startAddr, sizeof(data));
	for(i=0;i<10;++i)
	{
		setFunctionValue(i<<1,uncompressFourBit(data[addr],false));
		setFunctionValue((i<<1)+1,uncompressFourBit(data[addr],true));
		addr++;
	}
	for(i=0;i<6;++i)
	{
		setCtrlValue(i,data[addr]);
		addr++;
	}
	for(i=0;i<2;++i)  //no need to read/write last 3 func opts
	{
		for(j=0;j<8;++j)
		{
			setOptionValue((i*8)+j,(bool)bitRead(data[addr],j));
		}
		addr++;
	}
}
Exemplo n.º 2
0
unsigned char LedCircular::getFlashOnticks(unsigned char segment)
{
	return uncompressFourBit(flashOnOffTicks_c_[segment],1);
}
Exemplo n.º 3
0
unsigned char OdyPatch::getFunctionValue(unsigned char func)
{
	unsigned char i = func>>1;
	return uncompressFourBit(funcValue_c_[i],func%2);
}