Converting to v0.9.0

Do you have a question on how to do something.
Ask in here.
Post Reply
User avatar
jsclownfish
Posts: 375
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Converting to v0.9.0

Post 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
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Converting to v0.9.0

Post 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:

Code: Select all

ReefAngel.Relay.RelayDataE[0];
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.
User avatar
jsclownfish
Posts: 375
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Re: Converting to v0.9.0

Post 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
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Converting to v0.9.0

Post 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.
User avatar
jsclownfish
Posts: 375
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Re: Converting to v0.9.0

Post 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
User avatar
jsclownfish
Posts: 375
Joined: Mon Oct 24, 2011 7:52 pm
Location: Saint Louis

Re: Converting to v0.9.0

Post 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
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Converting to v0.9.0

Post 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"
Roberto.
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Converting to v0.9.0

Post by binder »

yeah, the internal memory generation error is a minor oversight on my part. it will be fixed soon. sorry for the inconvenience.
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Converting to v0.9.0

Post by binder »

Post Reply