![]() |
2009-03-22
, 21:34
|
Posts: 1,213 |
Thanked: 356 times |
Joined on Jan 2008
@ California and Virginia
|
#2
|
The Following User Says Thank You to Thesandlord For This Useful Post: | ||
![]() |
2009-03-23
, 01:05
|
Posts: 39 |
Thanked: 22 times |
Joined on Nov 2007
@ Vancouver, BC
|
#3
|
![]() |
2009-03-23
, 13:02
|
|
Posts: 334 |
Thanked: 366 times |
Joined on Nov 2008
@ Italy
|
#4
|
![]() |
2009-03-23
, 16:02
|
Posts: 39 |
Thanked: 22 times |
Joined on Nov 2007
@ Vancouver, BC
|
#5
|
I was thinking to dive a bit into C so I would love study your code for 'inspiration':
any chance to have the source?
![]() |
2009-03-23
, 16:12
|
|
Posts: 334 |
Thanked: 366 times |
Joined on Nov 2008
@ Italy
|
#6
|
Sure, please feel free. I'll release it to the public domain. Do it become so if I just say it? I hope so, it'll be like magic! *waves arms* it is away! If it makes anyone so frustrated about bad code that they hurt themselves, it's not my fault!
I would say though, that you should probably study someone else's code if you want to learn something. Speedometer seems to have some nice stuff in there regarding event hooks and such. This code was mostly auto-generated via glade-2 with my little bits and bobs bunged into main.c
The Following User Says Thank You to ciroip For This Useful Post: | ||
![]() |
2009-03-23
, 16:39
|
Posts: 39 |
Thanked: 22 times |
Joined on Nov 2007
@ Vancouver, BC
|
#7
|
I like challenges and I'm from the 'bad code fast release' school.... python milkshake...
![]() |
2009-03-23
, 17:54
|
|
Posts: 1,076 |
Thanked: 176 times |
Joined on Mar 2007
|
#9
|
![]() |
2009-03-23
, 18:58
|
|
Posts: 4,672 |
Thanked: 5,455 times |
Joined on Jul 2008
@ Springfield, MA, USA
|
#10
|
It's an incredibly crude program (It's my very first maemo app and even C!) so good luck with it
It shows the
- current speed
- distance travelled
- time elapsed since program start
- a 500 second graph of speed
- current time
It throws the data it gets from gpsd into a file in the same directory as the binary called "gps_log.txt". I was hoping that I could get the nmea data but couldn't quite figure it out. It also keeps the screen on during use via display_blanking_pause osso call.I've given up on the internal GPS and use an external bluetooth one instead.
It's just a single binary and you can download the bashed together version
Note, I had to update /var/lib/gps/gps_BT_devices before it recognized my external gps. Not sure what's up with that. Writing in gtk/hildon/etc is still kind of voodoo for me.
It's rather inaccurate. I'm up to 5km/h sitting down and when walking around, I've managed to get to 15km/h. I've got really long legs!
If anyone thinks they could do a better, job, well, PLEASE DO!