Subject:
|
Re: NQC API for the new Swan firmware
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Tue, 11 Jan 2005 19:40:42 GMT
|
Viewed:
|
5838 times
|
| |
| |
In lugnet.robotics.rcx.nqc, John Hansen wrote:
> So what Dick has written as
>
> kSystemOpcodesPerTimeslice
>
> I might instead use
>
> SYS_OPCODES_PER_TIMESLICE
I would in this case prefer the second - I actually use a "kMyNamedConstant"
convention in my code, and find it very nice to have the API constants very
easily seperable from my constants.
> So my issue is whether or not to continue the general
> pattern in NQC of defining a set/get pair for each source.
Again, personally I would prefer that, as it makes the most "sense" to the
way I think while coding (not that my coding always makes sense...)
> Would you rather write code like this?
>
> PingInterval = 0;
> MotorTransitionDelay = 50;
>
> Or would you rather write code like this?
>
> SetPingInterval(0);
> SetMotorTransitionDelay(50);
The second.
--
Brian Davis
|
|
Message is in Reply To:
| | NQC API for the new Swan firmware
|
| I am working feverishly on updates to NQC which will include extensions to the built-in API in support of Dick Swan's new firmware. My intent is to be consistent with the existing NQC API. However, there are some issues I am debating and I would (...) (20 years ago, 11-Jan-05, to lugnet.robotics.rcx.nqc)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|