Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
duration_adj error in sip.py
#1
I have a number OSPi's at my ranch in Oregon (Hazelnut orchid).  After upgrading from version 2.2.51 to 3.1.25, I found the program would hang and not start sprinklers.  It seemed to be related to the controllers that had a master.  Anyway, after a bit of effort, I discovered an error on line 54 of sip.py:

<                                     gv.sd['wl'] / 100 * extra_adjustment
---
>                                     duration_adj = gv.sd['wl'] / 100 * extra_adjustment

Without the "duration_adj = " part, the program would hang when it tries to use an undefined value for duration_adj on line 55 .  Anyway, I've attached a patch file for those who are having this issue, and assume that someone will fix it in the source code.

Thanks,
-Chris
 ==============================
"Be happy while you're living, for you're a long time dead." -Scottish Proverb
Chris Heegard aka Gatomon
==============================
Reply
#2
Thanks Chris,

The GitHub repo has been updated with your fix.
Reply
#3
(2015 Sep 07, 03:18 PM)dan Wrote: Thanks Chris,

The GitHub repo has been updated with your fix.

Dan,

How does one become a contributor to the SIP project?

I'm working on a large irrigation system with multiple controllers and would like one "master" controller to turn on/off sprinklers throughout the Hazelnut orchid (http://hznut.com/).  I have a drip irrigation system with a main controller in the pump-house and (so far) 5 controllers in the fields.  Each field controller controls up to 4 values and uses the A/D converter on the OSPi board to sense when the pressure is there.  In principle, I can tell if a value does not open or if it fails to close.  Thus, my system has feedback while typically an irrigation system is "open loop".  Two of the controllers are powered by a 12v battery that is charged by a solar panel.

I have been writing computer programs since I was in college (many years ago), starting with Fortran and pdp-11 assemby code.  I have written many programs in C, Matlab and Perl. (I tend to use Perl.)  I've used unix and now linux (Debian and Ubuntu) for many years.  I'm starting to learn Python (this project has motivated me).

Thanks,
-Chris
 ==============================
"Be happy while you're living, for you're a long time dead." -Scottish Proverb
Chris Heegard aka Gatomon
==============================
Reply
#4
To contribute to the project you can create a fork on GitHub. Clone your fork to your local system where you make edits and additions. Then push your updates to your GitHub repo. and issue a pull request to have your update merged into the main project.

The best reference for getting up to speed with git and GitHub is the Pro Git book (free):
https://progit.org/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)