Skip to content

Conversation

@jadonk
Copy link
Member

@jadonk jadonk commented Apr 9, 2021

Just a draft.

James and others added 17 commits January 8, 2019 22:10
These separate main files were just copies of each other and just do the same setup before calling _start.

Note that C28 probably does need setup to access the share memory.

Note that the OCP is not likely ever accessed, nor should it be enabled. It opens us up to bugs and these
modules should be using their own pins and local memories (which the ARM can see without enabling us
to reach out).
debian@bbai-donkey1:/opt/source/librobotcontrol/library$ rc_test_servos -s 1
Turning On 6V Servo Power Rail

Sending on all channels.
Sweeping servos back/forth between +-1.000000
Pulse Frequency: 50

... bug no movement. Need to get a scope to debug ...
@jadonk jadonk self-assigned this Apr 9, 2021
#define V_DIV_RATIO 11.0
#define BATT_DEADZONE 1.0

#define ADC2AI(x) (x==0?0:(x==1?1:(x==2?3:(x==3?2:(x==4?7:(x==5?6:(x==6?4:(x==7?5:-1))))))))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an ugly hack. Not the desired approach. I need to figure out how to do a better job remapping the channels in a more portable way.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a series of symlink entries into the device tree to create something like /dev/bone/adc/Px_y? I'd think that would be a better way to handle GPIOs than with the LED drivers like Deepak Khatri did for now.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an ugly hack. Not the desired approach. I need to figure out how to do a better job remapping the channels in a more portable way.

can we make ADC2AI(x) an inline function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants