Skip to content
This repository has been archived by the owner on Oct 1, 2021. It is now read-only.

oreoled merge #47

Open
wants to merge 300 commits into
base: master
Choose a base branch
from
Open

oreoled merge #47

wants to merge 300 commits into from

Conversation

jschall
Copy link

@jschall jschall commented Jan 7, 2016

No description provided.

jschall and others added 30 commits January 29, 2015 16:36
This will be used to make updating firmware on boot for vehicles with
no safety switch possible without power cycling. The startup script
needs to be able to force safety on to allow the reboot to work.
this uses the same table driven approach as the hmc5883 driver, and
allows for a ms5611 baro on any of the 4 bus combinations. A simple
"ms5611 start" will start all baros that are found.
the ms5611 can be on two addresses. The driver handles this, not the
board config
this is used in APM startup to see if we should start nsh on usb when
no microSD is inserted
don't reset after test, and leave us in correct polling mode
it makes no sense on the external SPI bus
this actually reduces timing glitches in ArduPilot significantly, as
the I2C transfer has enough time between interrupts for other tasks to
get some work done. Changing just this bus speed down to 100kHz
reduces the number of timing misses for ArduCopter on Pixhawk by a
factor of 3x
this caused heap corruption
smart batteries report a negative current when being discharged
this allows for input of PWM signals on the FMUv2 aux5 pins
this is the default mode ArduPilot uses, and by setting it in the init
script we avoid any pin activity on the two GPIO pins during boot
@tridge
Copy link

tridge commented Jan 7, 2016

after merging this for a test build I found the fw shrank by 7.8k. I'm not complaining, I'm just surprised and suspicious. Any idea what make it a lot smaller?

@tridge
Copy link

tridge commented Jan 7, 2016

I think we also need to only start the oreoled driver on Solo. It is built and started unconditionally at the moment. I think we need a BRD_OREOLED parameter that starts the driver if needed (see how it was done for canbus in AP_BoardConfig)
The reasons for making is only if the parm are set is to reduce the risk that these changes break non-solo. When I boot with these changes I see:
oreoled on I2C bus 2 at 0x68 (bus: 100 KHz, max: 100 KHz)
oreoled started OK
on a naked pixhawk with no oreoled. That worries me.
If the code only starts on solo then I know it is harmless. Solo can set it to start by default

@tridge
Copy link

tridge commented Jan 7, 2016

while adding BRD_OREOLED, maybe BRD_SMBUS would be a good idea too?

@jschall
Copy link
Author

jschall commented Jan 7, 2016

We have a #define already (OREOLED_ENABLED) that we could use.

Ideally these drivers (SMBUS and OREOLED) would only be using resources if the relevant device was detected on startup.

@tridge
Copy link

tridge commented Jan 7, 2016

they use resources on all boards right now
a parm in BRD_* would fix it nicely

@rmackay9
Copy link

rmackay9 commented Jan 7, 2016

In earlier versions of the driver, I think it would shut itself down after 10seconds if it did not successfully communicate with the LEDs.

@jschall
Copy link
Author

jschall commented Jan 7, 2016

After discussing with Tridge, I'll add a BRD_ parameter for this.

@magicrub
Copy link

this is old and has conflicts. @jschall are you wanting to rebase this?

@jschall
Copy link
Author

jschall commented Sep 27, 2016

Nope!

@magicrub
Copy link

looks like this is replaced with ArduPilot/ardupilot#6092 so closing

@magicrub magicrub closed this Apr 19, 2017
@OXINARF
Copy link
Member

OXINARF commented Apr 19, 2017

@magicrub They are completely different things. We don't have an oreoled driver in ArduPilot layer and, unless someone is doing it, it would be of interest to update the current one to the latest done by 3DR (not necessarily this PR).

@magicrub
Copy link

k, I'll reopen it and let it linger so someone can come along later and pick the branch to merge it some other time..

@magicrub magicrub reopened this Apr 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.