Strange behaviour with horizontal graphs on MX4?
Posted: Sun Jan 25, 2009 5:05 pm
Am I doing this wrong, or something? I've got an MX4 and I'm graphing my CPU usage with a horizontal graph. I call my InitGraph() function first:
Later, my DrawGraph() function gets called by the software to actually draw the graph:
For some reason, when the graph gets to be more than one character long, I get blocks with capital 'P's in them for all the full blocks. The partial block at the far end of the graph draws correctly. Am I doing something wrong? Text appears to be displayed just as it's supposed to.
Code: Select all
unsigned long CLCDControls::InitGraph()
{
unsigned long writeCount = 0;
BYTE writeArray[2] = {0xFE, 0x68};
writeCount = WriteToPort(writeArray, 2);
return(writeCount);
}
Code: Select all
unsigned long CLCDControls::DrawGraph(int column, int row, int dir, int length)
{
unsigned long writeCount = 0;
BYTE writeArray[6];
writeArray[0] = 0xFE;
writeArray[1] = 0x7C;
writeArray[2] = column;
writeArray[3] = row;
writeArray[4] = dir;
writeArray[5] = length;
writeCount = WriteToPort(writeArray, 6);
return(writeCount);
}