I'll change the servo numbers from 0-23. I'll put all this on my to-do
list which is quite large at the moment, it will take some time. I did
not have time to put enough documentation, so yes, I agree!

Thanks for the feedback, let me know if you have more suggestions. Seb
suggested that I have separate min/max values for each individual
servo, so I'll do that as well.

Matt.

On Oct 15, 2:26 am, Joep Suijs <[email protected]> wrote:
> Hi Matt,
>
> > A quick glance shows that the line "servo_1_to_8_num" may not be
> > needed. I can't quite remember. I'll try to find time to look at this.
> > If you comment it out, does it still work ok?
>
> I have not run the code yet, so I would not know. And since you can't
> remember what servo_1_to_8_num was used for, I assume you agree the
> documenation is too brief ;)
>
> > I had chosen to number actual servos from 1 to 24. To save memory
> > space, some variables where named 0-7. I think I remember also that
> > having no servo number 0 actually helped me later on when I made the
> > I2C slave servo controller.
>
> > Do you really think it should be changed now?
>
> I sense you don't feel like it, but since you ask: yes.
>
> > Why does a byte save space over a bit?
>
> You have to study the asm code to find out. I guess it is easy to
> check if a byte is zero than a specific bit in a byte.
> So this has to do with how the compiler works and could even change
> over time. The average use should not care about this, but when you
> are creating libraries you should.
>
> > A delay is a delay, weather I use _usec_delay or the delay library.
>
> There is a difference: you use inline delays which are accurate and
> large and the accuracy is not required. People following your example
> exhaust memory faster, while using delay.jal shows them an
> alternative. And if you use the compiler delay in your libraries, it
> becomes larger than required.
>
> > I did not require a exact delay. I would use the delay library more if
> > delay_1ms was changed to a word input variable. This would allow me to
> > create 1sec delays.
>
> This is an other topic! You can create a 1sec delay with delay_100ms().
> Changing the parameter to a word one makes the library grow. Maybe we
> should add a delay_10ms...
>
> > Could you please give me an example of a bit-mask compared to bitwise?
>
> (not tested)
> punt
>    servo_mask = 1
> next to
>    _servo_1_to_8_isr_count = 0
>
> and
>   servo_mask = servo_mask * 2
> next to
>    _servo_1_to_8_isr_count = _servo_1_to_8_isr_count + 1
> -- go to next step
>
> Than you can put a single check at the start of set_level:
>
>    if (servo_1_to_8_on & servo_mask) != 0) then
>
> Joep

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to