Show Posts
Pages: 1 2 3 [4] 5 6 ... 18
46  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: remove confusing Processing UI elements on: May 01, 2009, 08:25:00 pm
Many others have complained about these kind of things too,  file extensions, open dialog boxes, clunky UI issues such as the serial monitor button too close to the upload button, meaningless icons.   There is some talk about finally fixing these things, and it may finally get done fairly soon.

Long time Arduino / Processing users have a fond memories for the quaint bugs that Arduino  inherited from Processing such as the charming auto-format delete bug that would delete code if auto-format was invoked with unbalanced brackets. It worked the same in both programs and would delete the unbalanced code, and autoformat the rest, tidying up that messy code. Maybe it was a feature.

Probably these things would have been fixed sooner, if there were more people actually making decisions with the development, as opposed to the limited voices that control development now. But maybe not too. People still have to come to some kind of consensus, if they work in a democratic environment. With a czar system, the czar has to get around to deciding. Both systems have strengths and weaknesses, but one might wish for a more hybrid open-source system, to input more of the work that an increasing array of talented programmers have offered to do.

Keep asking for those features, as I said, there finally seems to be some movement on these UI issues.

PaulB
47  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: increasing number of servos servo.h can handle on: April 10, 2009, 06:19:23 pm
It could be done but the timers on the other pins are used for other things. Use the other servo library, it works great and addresses servos on any pins.

The only inconvenient issue about the other library is that it is  named the same thing as the first one. And both should be in the core distribution. There was a rough consensus to change the name of the second library to SoftwareServo - following the SoftwareSerial  example, only no one has done anything about it in more than a few months.

PaulB
48  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: A simple suggestion to a small problem on: March 10, 2009, 06:01:30 am
Lots of similar suggestions (and something very close to yours) were discussed on the developers list. You should join if you've got a bit of time. The traffic isn't that heavy.

 I'm not sure whether any consensus emerged but David Mellis, who would eventually have to make a decision on this, didn't act.

Perhaps he will summarize his views here.

paulb
49  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: PROGMEM no longer working with 0013? on: February 27, 2009, 12:48:40 pm
I changed the docs a bit.

Can someone have a go at recommending which form for variable declarations we should recommend to users


dataType variableName[] PROGMEM = {};    // eenie
dataType PROGMEM variableName[] = {};    // meenie, minie
PROGMEM  dataType  variableName[] = {};  // mo

From the discussion, seems like form 3 should be the current form.

******************

Please note that PROGMEM is not part of the Arduino language and disseminating this information throughout the Arduino community should be done at your own risk.
50  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Alternate Library Location(s) on: February 14, 2009, 12:53:32 am
There was some discussion of similar ideas (some kind of path for user libraries) on the developers list, with lots of people supporting the idea.

For better or worse, lots of the IDE ideas are adopted from the Processing IDE, so Arduino shares all the same bugs and quirks (except with a time lag).  I think Processing has adopted a system that addresses user libraries so we'll probably see some action on this eventually.

I think a search path in the prefs file makes lots of sense though and seems like it would be easy to implement.

51  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: how to help with documentation? on: February 14, 2009, 12:46:36 am
Just post your information here for now.

David Mellis has the last word on the documentation, so you'll need to get his attention, to work on the site.

He also has the last say about what and where things get documented so you may have perhaps seen documentation that got moved, edited or just deleted. But we're always looking to make it better so post your  suggestions please.

paulb
52  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: FrequencyTimer2 library link on: February 11, 2009, 12:43:42 pm
Oops,

Thanks Andrew - don't know how I missed that ...
53  Forum 2005-2010 (read only) / Bugs & Suggestions / FrequencyTimer2 library link on: February 10, 2009, 11:04:50 am
Anyone know where the download link for this library is?
It this an AVR library that is already in Arduino folder?


http://www.arduino.cc/playground/Code/FrequencyTimer2
54  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Error in abs function? on: January 27, 2009, 12:44:01 am
OK I got it - I should have read through all the preceding more carefully.

So the take-home seems to be that macros are the best of all possible worlds right now, and are staying.

So we should write some warnings to users about the side effects in the docs.
55  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Error in abs function? on: January 23, 2009, 12:13:51 am
I think the min and max functions have similar problems.

min(x++, 20);

ends up counting by two's because it gets evaluated twice - but now I know why.

Aren't these functions included in AVR math libc library? Is there some big disadvantage (in memory) to using that library?

The upside is that you get the rest of the library. At one point I thought the library was already included, so wouldn't these functions then be "free"?


PaulB


56  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Clarify float and double data types identical on: January 26, 2009, 10:47:43 pm
OK there's the new docs, comments welcome.

The powers that be sometimes fret when this much information is put into the hands of Arduino users, so of course they are subject to change.

PaulB

57  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: delayMicroseconds(0) on: January 26, 2009, 10:33:26 pm
I'm writing to see if I can get some of the amazing coders who are currently reading this list to test this proposed fix and confirm my results. It's possible that the fix works differently now since it was last tested with Arduino 10/11.

According to my results this fix is FREE and works EXACTLY LIKE THE ORIGINAL function except without the nasty surprise when using zero or neg numbers for a parameter.

Perhaps someone could decompile and look at the machine code to confirm that the two are equivalent.

If this is the case, then the reason for leaving in this irritating bug in a language / project whose stated goals is to make programming easy for beginners is perplexing. Or at least it tends to make one wonder if there are other reasons....

PaulB
58  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: delayMicroseconds(0) on: December 23, 2007, 12:50:22 pm
Postscript:

I did some testing of the code change and (surprisingly) it seems to make no difference in timing.

Here's the relevant code in delayMicroseconds function

      // code A
//      if (--us == 0)          // decrement to offset function overhead
//      return;
  

Here's the code fix

      // code B
      if ((int)us < 2 )      // cast cures negative number rollover
      return;
         us--;                   // decrement to offset function overhead


code A is the original and code B is the fix.

I can detect absolutely no difference in the testing I did except code B fixes the issues.

Here's the test setup (I can see your eyes glazing over - snap out of it!)


/* Test delayMicroseconds() with param of zero
*/
 
int tdelay;
unsigned long i, hz;
unsigned long start, TotalLoopTime;
int outPin = 11;
 
void setup(){
  pinMode(outPin, OUTPUT);
  Serial.begin(9600);
  Serial.println("start");
}
 
void loop() {
    start = millis();                      // get start time of  loop
    for (i = 0; i < 1000000; i++){         // a million times through the loop
      delayMicroseconds(2);
    }
    TotalLoopTime = millis() - start;      // compute time through inner loop in milliseconds
  
  Serial.print("time = ");
  Serial.println(TotalLoopTime, DEC);
  
}

Here's the results

value of param        0         1            2              4
______________________________________________________________________________________________
Code A             rolls over  3011         3953       5959        results in milliseconds

Code B               3011      3011         3953        5959

All of the numbers jitter randomly by one or two, presumably because of interrupt firings or serial.print or some other unknown (to me) phenomenon.

Please replicate my results on this if you care, then can we finally fix the code and move on?

A more patient math-head than me might also want to see if the function is as advertised, with about 1 us going into the function overhead.


There is another decrement farther down in the code that could be combined with the decrement to tweak timing. Should anyone care to get into it. I imagine it's only going to be possible to confirm this through some patient work with an oscilloscope or through sorting through the machine code and counting instructions, though. I'm not up for either at this point.


Yours in easy-to-use microcontroller code,

Paul Badger
59  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: delayMicroseconds(0) on: November 17, 2007, 10:37:51 pm
"Then that's where the check needs to be - not in the library!"

Except that the language is supposed to be easy to use for beginners. The function dumbs down the resolution to 1 us from .25 us (ostensibly to make it easier to use) so what the heck is one more check. (.25 us?).

Anyone using the language could easily expect delayMicroseconds(0) to generate as-close-to-zero-as-possible a delay not 1023 us.

BTW - negative numbers are also going to generate long delays I think.
Checking for errors in this function makes for one more place the code can't screw up. If you want to argue for efficient machine code fine - but you've got to explain all the other inefficiencies, of which the 1 us resolution is only one. And also the stated philosohpy of making something for beginner coders.

It's been traumatic for certain parties to even see documentation of C and AVR arcana in the reference section.

I repeat - fix this ______ instead of documenting it.


if (--us < 2)
return;

Doesn't that fix it? Predecrement and one comparison.
You've got your predecrement to bring to the party!

Would making the parameter a signed long also fix negative numbers this way?
How does that playout with the right bitshift 2 dumbdown (er ease of use feature)

Anyway the rumor is that we're due to get a whole new timing system for Arduino 0011. Is this still on track?

Yours in tightly balanced tradeoffs,

Paul
60  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: delayMicroseconds(0) on: October 12, 2007, 09:02:31 pm
So why don't we fix this ___ instead of documenting it?

As I see it, it would require only one more comparison, which would execute only in the case of 0. And the code should function the same way it does now.

Am I missing something?

PB
Pages: 1 2 3 [4] 5 6 ... 18