Moonphase on display.....

Share you PDE file with our community
Post Reply
stephy
Posts: 26
Joined: Sat Jun 02, 2012 1:36 am
Location: Livorno (Italy)

Moonphase on display.....

Post by stephy »

Code: Select all

//*********************************************************************************************************************************
//Custom Main, Graph & Menu
void DrawCustomMain()
{
  byte x = 6;
  byte y = 2;
  byte t;
  char text[7];

  ReefAngel.LCD.DrawDate(6, 2);
  ReefAngel.LCD.Clear(COLOR_BLACK, 1, 11, 127, 11);
  pingSerial();

  ReefAngel.LCD.DrawText(0,255,18,12,"EcoSmart Vortech");
  ReefAngel.LCD.Clear(255, 1, 19, 128, 29);
//  if (vtechmode == 0) ReefAngel.LCD.DrawLargeText(COLOR_LIMEGREEN,255,35,21,"Constant");
//  else if(vtechmode == 1) ReefAngel.LCD.DrawLargeText(COLOR_GOLD,255,42,21,"Lagoon");
//  else if (vtechmode == 2) ReefAngel.LCD.DrawLargeText(COLOR_GOLD,255,25,21,"Reef Crest");
//  else if (vtechmode == 3) ReefAngel.LCD.DrawLargeText(COLOR_CORNFLOWERBLUE,255,22,21,"Short Pulse");
//  else if (vtechmode == 4) ReefAngel.LCD.DrawLargeText(COLOR_PINK,255,25,21,"Long Pulse");
//  else if (vtechmode == 5) ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,8,21,"Nutrient Trnsp.");
//  else if (vtechmode == 6) ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,23,21,"Tidal Swell");
//  else if (vtechmode == 9) ReefAngel.LCD.DrawLargeText(COLOR_WHITE,0,45,21,"Night");

  ReefAngel.LCD.DrawText(0,255,16,30,"Vasca");
  ConvertNumToString(text, ReefAngel.Params.Temp[T1_PROBE], 10);
  ReefAngel.LCD.DrawLargeText(COLOR_INDIANRED, 255, 10, 40, text, Num8x8);
  pingSerial();

  ReefAngel.LCD.DrawText(0,255,100,30,"pH");
  ConvertNumToString(text, ReefAngel.Params.PH, 100);
  ReefAngel.LCD.DrawLargeText(COLOR_PLUM, 255, 85, 40, text, Num8x8);
  pingSerial();

  byte TempRelay = ReefAngel.Relay.RelayData;
  TempRelay &= ReefAngel.Relay.RelayMaskOff;
  TempRelay |= ReefAngel.Relay.RelayMaskOn;
  ReefAngel.LCD.DrawOutletBox(12, 77, TempRelay);
  ReefAngel.LCD.DrawText(COLOR_DARKTURQUOISE, COLOR_WHITE, 70, 39, "Moon Phase");
ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,70,105,MoonPhaseLabel());
pingSerial();
When I try to compile
C:\Users\tin Oz 2.5\Documents\Arduino\libraries\Globals/Globals.h:898: error: expected unqualified-id before ')' token
tinozzina_con_vortech_lib1_e_disp_per.cpp: In function 'void DrawCustomMain()':
tinozzina_con_vortech_lib1_e_disp_per:66: error: expected primary-expression before ')' token
.....?
Stephy

Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Moonphase on display.....

Post by rimai »

Bug :(
https://github.com/reefangel/Libraries/issues/33
http://forum.reefangel.com/viewtopic.php?p=11537#p11537
I can't figure out why and asked Curt to check and see if I'm missing something.
Roberto.
stephy
Posts: 26
Joined: Sat Jun 02, 2012 1:36 am
Location: Livorno (Italy)

Re: Moonphase on display.....

Post by stephy »

rimai wrote:Bug :(
https://github.com/reefangel/Libraries/issues/33
http://forum.reefangel.com/viewtopic.php?p=11537#p11537
I can't figure out why and asked Curt to check and see if I'm missing something.
No other way to show moonphases? I have problems with vortech too...
Stephy

Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Moonphase on display.....

Post by rimai »

Curt just found out what the bug was.
I'll have it included in the next release.
Roberto.
User avatar
DrewPalmer04
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL

Re: Moonphase on display.....

Post by DrewPalmer04 »

YAY!!!
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
psyrob
Posts: 247
Joined: Thu Sep 01, 2011 8:44 pm

Re: Moonphase on display.....

Post by psyrob »

Awesome! Curt is the man!! :D
Image
User avatar
DrewPalmer04
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL

Re: Moonphase on display.....

Post by DrewPalmer04 »

STILL?:

Globals\Globals.cpp.o: In function `MoonPhaseLabel()':
C:\Users\User\Documents\Arduino\libraries\Globals/Globals.cpp:135: multiple definition of `MoonPhaseLabel()'
RA_060912_2037custom2.cpp.o:C:\Users\User\AppData\Local\Temp\build5303375440253332151.tmp/RA_060912_2037custom2.cpp:275: first defined here
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Moonphase on display.....

Post by rimai »

Just remove the function you have at the end of your code.
It became part of the libraries and you don't need to declare in your code anymore.
Roberto.
User avatar
DrewPalmer04
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL

Re: Moonphase on display.....

Post by DrewPalmer04 »

Oh cool. Thanks!
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
Post Reply