Go to Post Skill in software engineering is all about algorithmic understanding and intuition. Implemenation is an important, but ultimately secondary, concern. Programming languages are more or less arbitrary. - phrontist [more]
Home
Go Back   Chief Delphi > ChiefDelphi.com Website > Extra Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 5 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #12   Spotlight this post!  
Unread 13-03-2015, 16:00
KMBruggeman KMBruggeman is offline
Registered User
FRC #3737 (RotoRaports)
Team Role: Programmer
 
Join Date: Mar 2015
Rookie Year: 2014
Location: Goldsboro, NC
Posts: 8
KMBruggeman is an unknown quantity at this point
Using the A x-axis data stream

As I was meandering through the code this afternoon I had this random thought. It looks the axis values are defined in "USB_gamepad.h" source such that they are contained in the data structure "USB_GamepadReportTx".

https://github.com/TI-FIRST/MSP430-G.../USB_gamepad.h

If I look at that it appears that *.ax, *.ay, etc are all 16bit integers. Could I modify the code from https://github.com/TI-FIRST/MSP430-G...b/master/hal.c (line 517)

from: "gamepadReportTx.ax = Convert8Bit(ADC12_A_getResults(ADC12_A_BASE, ADC12_A_MEMORY_12));"
to "gamepadReportTx.ax = encoder_count;" as that would allow me in essence to have up to 8 x 16BIT signed integers in my HID data stream?

(gamepadReportTx is defined on line 151 to type USB_GamepadReportTX from the first linked file.)

I would then just need to see how LV views/processes that data converting it into a float with the range -1.0 to 1.0 but my guess would be by dividing it by 2^15 ...

Am I totally off base here or is my lack of sleep starting to pay off?
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 18:34.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi