Page 1 of 1
Converting to v0.9.0
Posted: Tue Feb 14, 2012 9:43 am
by jsclownfish
First test worked great from the new RAGen. When I tried to modify my custom main, it doesn't like this...
Code: Select all
// Display arrows for Wavemaker
ReefAngel.LCD.DrawText(DPColor,DefaultBGColor, 64, 33,"WV:");
if (bitRead(ReefAngel.Relay.RelayData,Relay5)==1) ReefAngel.LCD.DrawText(APColor,DefaultBGColor, 82, 33,"-->"); //port 5 on
else if (bitRead(ReefAngel.Relay.RelayData,Relay6)==1) ReefAngel.LCD.DrawText(APColor,DefaultBGColor, 78, 33,"<--"); //port 6 on
else ReefAngel.LCD.DrawText(APColor,DefaultBGColor, 78, 33," O "); //port5 and port 6 off, wavemaker delay
I get this error...
Main2v1.cpp: In function 'void DrawCustomMain()':
Main2v1:51: error: 'Relay5' was not declared in this scope
Main2v1:52: error: 'Relay6' was not declared in this scope
Is there new code to query if a relay is on or off? Also, how do we ask for the same question for an extension relay port?
Thanks,
Jon
Re: Converting to v0.9.0
Posted: Tue Feb 14, 2012 9:54 am
by binder
It should be Port5 and not Relay5 unless you have Relay5 defined as Port5. So just change all of the RelayX to PortX and you should be good to go. (ie, Port5, Port6)
There isn't any new code to query the port status. It's still done the same way. That could be added though. Thanks for the suggestion.
The relay data mentioned and discussed in my Main Screen Guide / Manual.
http://forum.reefangel.com/viewtopic.php?f=14&t=109
For first relay box, use this:
where you put in the ReefAngel.Relay.RelayData
The same concept applies and works for the libraries except the includes are a little different now.
Re: Converting to v0.9.0
Posted: Tue Feb 14, 2012 10:54 am
by jsclownfish
Thanks Curt. That fixed that issue. I as I continue to play, I noticed that the large letter and number calls aren't working. I don't see the code in the new library for drawing these custom size characters. Am I missing something?
-Jon
Re: Converting to v0.9.0
Posted: Tue Feb 14, 2012 11:49 am
by binder
They should still be there. You will want to make sure that you have the FONT_DxD enabled in the features file. The large font stuff has not been removed. If anything, it's easier now to enable them since you can select them from the Features tab in RAGen.
Re: Converting to v0.9.0
Posted: Tue Feb 14, 2012 11:57 am
by jsclownfish
I see it now. I've been doing so much custom work lately I haven't used RAGen in awhile. It appears that the new features.h file adds the defines in from RAGen instead of selecting them by using the //. Since I didn't originally have them in the RAGen test, I didn't see them in the features file.
-Jon
Re: Converting to v0.9.0
Posted: Tue Feb 14, 2012 8:32 pm
by jsclownfish
I tried to load a simple code with the new libraries/RAGen tonight and I get a "No Internal Memory" screen. When I tried to make a new internal memory INO, I can't get it to compile due to a series of RA_NokiaLCD errors.
BTW, I realized I don't have the old version of the controller to go back to once I uninstalled it and installed the new one. Do you have a link to the last version as well, in case I can't get this figured out soon.
Thanks,
Jon
Re: Converting to v0.9.0
Posted: Tue Feb 14, 2012 8:33 pm
by rimai
That's the bug someone found today
RAGen can't generate internal memory files correctly.
Use the one in the examples folder called "InitialIntenalMemory"
Re: Converting to v0.9.0
Posted: Wed Feb 15, 2012 7:16 am
by binder
yeah, the internal memory generation error is a minor oversight on my part. it will be fixed soon. sorry for the inconvenience.
Re: Converting to v0.9.0
Posted: Wed Feb 15, 2012 6:29 pm
by binder