Closed Paku- closed 9 years ago
demo script change added in 4d3cb06
I'm working on db and script hope you are not doing the same ...
Does the script only sets pins in OUT mode if enabled ???
yes
So we have to cover the IN pins as well ...
Eventually, yes but I am trying to take this one step at a time
sure ...
Was there a reason you chose WHERE concat('',pinNumberBCM * 1) = pinNumberBCM
and not WHERE pinNumberBCM REGEXP '[0-9]+';
?
isn't it the same ??, just found somewhere it's faster .. and I hate regexpr as the bash as well (nor I'm good in it).... BTW it took me 1h to find how to put line elements into the array ... >>> arr=($this_pin) .. hate scripts ...
The end result is the same, I didn't know concat was faster. I suck at regex as well but sometimes regex is the way to go.
Have the idea how to make script faster but I am to short on bash knowledge,so will push my work here. Look at it you will finish it much faster ... The main idea is to limit mySQL CLI calls to just one inside the loop.
Create new branch and merge it into it. Then after edit you can merge into ajax. (0f543c9)
I am here so can help on git.
or just checkout the db_update branch from my repo then pull the request. I will then send it to ajax ...
@linwiz OK ??
You're definitely helping. I like the work you are doing, and good catch on the speed update, maybe the other mysql calls can be done away with also.
thanks .. can you finish it ??
I think so lol
but you have merge into ajax ... is there any option to merge into NEW branch (on github) ?? If no it's ok, but now ajax head is filled with broken code /not runnig/ so if any other dev would like to help, he will get not running code what's bad for master like branch ... good there are only two of us here :)
Check out the details, so B and B+ (v2 and v3) boards are pinout compatible. It means we do not need separate tables for them we just have to limit the first select in the service so for v2 we only see pins 1-26 while for v3 1-40.
In that case, the RPi Compute module with like 60 gpios can use the v2 table as well.
This is just and idea how the board table should looks like.
Pls do not merge it it's just for your review.
Have no idea if the service script will work on it or no, pls look closer if we can use it. (you can grab branch from my repo)
In simple words the db should correspond to the true board logic ..
Other thing is that boards are compatible on the pin level so v1 up to v3 should work on the same table but using limited rows access.