go_away

Author Topic: Using a Skylab SKM53 with Webbotlib generated code  (Read 879 times)

0 Members and 1 Guest are viewing this topic.

Offline LesterTopic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 0
Using a Skylab SKM53 with Webbotlib generated code
« on: June 04, 2012, 02:03:51 PM »
Have searched the forum for an answer to this but cannot find.

After I get a valid reading from gps.isValid() the generated code prints the number of satellites used (generally 5->9) but will only print lat and lng (and everything else from a gps.dump() or any other functions) values as a question mark.

Using UART3.

Cannot get time, lat, lng, you name it, they all come back as a question mark, literally, a ? is what it prints.

Any hints?

From opt_DeviceName.c

#include "../hardware.h"
static const char PROGMEM name_button[] = "button";
static const char PROGMEM name_uart1[] = "uart1";
static const char PROGMEM name_myGPS[] = "myGPS";
static const char PROGMEM unknown[] = "?";

#define NUM_DEVICES 3
static const void* PROGMEM tbl[]={
   &_button_, name_button,
   &__C_uart1, name_uart1,
   &_myGPS_, name_myGPS
   };

const char* getDeviceName(const void* device){
   const char* rtn = unknown;
   for(int i=0 ; i<NUM_DEVICES*2; i+=2){
      const void* addr = (const void*)pgm_read_word(&tbl);
      if( addr == device){
         rtn = (const void*)pgm_read_word(&tbl[i+1]);
      }
   }
   return rtn;
}


Should I have used the default name for the GPS class?

Offline LesterTopic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 0
Re: Using a Skylab SKM53 with Webbotlib generated code
« Reply #1 on: June 04, 2012, 06:18:53 PM »
should have mentioned, on an Axon board.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,150
  • Helpful? 110
Re: Using a Skylab SKM53 with Webbotlib generated code
« Reply #2 on: June 04, 2012, 06:30:25 PM »
The gps code uses floating point numbers (for stuff like longitude and latitude).

When doing the code gen you've no doubt selected one of the two options that don't support floating point numbers so outputs them as a '?' (as it shows you it will  ;) ). You need to select the "Floating Point" option.

Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline LesterTopic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 0
Re: Using a Skylab SKM53 with Webbotlib generated code
« Reply #3 on: June 04, 2012, 06:58:08 PM »
dadblanggummit....

Thanks.  I must have looked at that 5 times and thought I had checked the right box but noooooo....

Nice code wizard...  you must have put a ton of work into it.  I think you have a donate button somewhere don't you?

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,150
  • Helpful? 110
Re: Using a Skylab SKM53 with Webbotlib generated code
« Reply #4 on: June 05, 2012, 05:06:01 PM »
Nice code wizard...  you must have put a ton of work into it.  I think you have a donate button somewhere don't you?


You can find it on the sourceforge homepage http://sourceforge.net/projects/webbotavrclib/
Anything welcome!
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

 


Get Your Ad Here