Page 1 of 1

v0.9.4 Released

Posted: Wed Mar 28, 2012 6:10 pm
by binder
Just released v0.9.4 version of the libraries. The highlights are as follows:
  • Added temperature range check
  • RF Speed range changed from 0-255 to 0-100
  • Salinity compensation (credits to ahmedess)
  • Added internal memory functions for expansion pwm slope values
  • Added Circles outlet box (credits to jsclownfish)
    Usage:

    Code: Select all

    ReefAngel.LCD.DrawCircleOutletBox(x, y, RelayData, reverse);
    x & y - screen coordinates
    RelayData - relay box to draw
    reverse - true/false to display order of outlets to match relay box
  • Added WavemakerToggle function to toggle two relays on/off alternating
    Relay1 will be on and Relay2 will be off, then switch
    Usage:

    Code: Select all

    ReefAngel.WavemakerToggle(WMRelay1, WMRelay2, WMTimer);
  • Bug fix for IO and PWM expansion module only refreshing on main screen

Re: v0.9.4 Released

Posted: Sat Apr 28, 2012 9:08 pm
by TanksNStuff
Curt,
I was eagerly awaiting this change:
Added internal memory functions for expansion pwm slope values
I just updated my Android app and the default value for start%, end%, and duration for all 6 PWM channels seems to be 255. That could be due to the fact that I didn't upload new code to my controller yet... but regardless, the % fields should be 0-100 range, no? 255 should not be a valid value.

Just wanted to check with you on this before I upload my revised coding to take advantage of these new memory locations and have problems.

Also, will I need to use the new PWM Parabola function instead of the slope to utilize these?

Re: v0.9.4 Released

Posted: Sun Apr 29, 2012 5:59 am
by binder
TanksNStuff wrote:Curt,
I was eagerly awaiting this change:
Added internal memory functions for expansion pwm slope values
I just updated my Android app and the default value for start%, end%, and duration for all 6 PWM channels seems to be 255. That could be due to the fact that I didn't upload new code to my controller yet... but regardless, the % fields should be 0-100 range, no? 255 should not be a valid value.

Just wanted to check with you on this before I upload my revised coding to take advantage of these new memory locations and have problems.
The reason those values are at 255 is because they are "uninitialized" memory locations. New locations often times get the max values when the memory has never been used.
You are correct, the ranges should be between 0-100. The Android App will only allow you to input a value from 0 to 100. So, my recommendation is to use the app to initialize the values BEFORE you upload your new code. Otherwise you may experience undesirable actions (aka improper input to your driver and no output).
Also, will I need to use the new PWM Parabola function instead of the slope to utilize these?
No. These values will work with any of the PWM functions (Slope or Parabola). Here's how you can use them.

Code: Select all

// These functions use the StandardLights time schedule for ON and OFF times
// PWMSlope,  channels 0 - 5
ReefAngel.PWM.Channel0PWMSlope();
// with a minute offset
ReefAngel.PWM.Channel1PWMSlope(60);  // 60 minute offset
// PWMParabola, channels 0 - 5
ReefAngel.PWM.Channel2PWMParabola();
// with a minute offset
ReefAngel.PWM.Channel3PWMParabola(30);  // 30 minute offset

// Then there's the LONG form of them if you did not want to use the StandardLights time schedule
// Replace the variables with the appropriate values
ReefAngel.PWM.SetChannel(4,PWMSlope(
  OnHour,
  OnMinute,
  OffHour,
  OffMinute,
  Start,
  End, 
  Duration,  
  ExpansionChannel[4] 
));
// PWMParabola
ReefAngel.PWM.SetChannel(5,PWMParabola(
  OnHour,
  OnMinute,
  OffHour,
  OffMinute,
  Start,
  End, 
  ExpansionChannel[5] 
));
Also, one side note. I would hold off on updating until the next release (which should be within a week). There is a fix for the PWM expansion value sending.

Re: v0.9.4 Released

Posted: Sun Apr 29, 2012 6:32 am
by TanksNStuff
Thanks Curt. I appreciate the extra notes.

I'll wait for the next update before upgrading everything then.

By the way... what's the difference between the slope and parabola functions? They seem to be doing the same thing to me.

Sent from my DROID RAZR using Tapatalk

Re: v0.9.4 Released

Posted: Sun Apr 29, 2012 8:00 am
by binder
http://forum.reefangel.com/viewtopic.ph ... bola#p8826
Sebyte has a nice comment about how it works and the difference.

Re: v0.9.4 Released

Posted: Sun Apr 29, 2012 5:56 pm
by TanksNStuff
Thanks again Curt. I think I might try the parabola next upload (after the next release) and see if I like it any better.