Add support for FishDrone_INAV board#919
Add support for FishDrone_INAV board#919Linjieqiang wants to merge 14 commits intoiNavFlight:developmentfrom Linjieqiang:FishDrone_INAV
Conversation
Release version 1.4
|
@Linjieqiang please rebase on |
|
@digitalentity OK. |
|
@digitalentity Can you merge this in V1.5 nor V1.6?I will go on the code update and the board was tested OK. |
|
Please rebase on |
|
@digitalentity OK.I go on my work for this pr. |
|
@Linjieqiang please consider rebasing against |
|
Oh,Sorry.That's my fault. |
|
I'm trying to save you some time. Changes between |
|
OK.I am trying to rebase it. |
…light into FishDrone_INAV # Conflicts: # src/main/drivers/compass_ist8310.c # src/main/drivers/compass_ist8310.h # src/main/io/serial_cli.c # src/main/sensors/compass.h # src/main/sensors/initialisation.c # src/main/target/FishDroneF4NAV/target.h # src/main/target/FishDroneF4NAV/target.mk
|
@digitalentity Can you review my code again?Is that ok? |
|
Still merge conflicts in |
|
But I didn't find out what conflicts in compass.c between two repertories. |
|
# Conflicts: # src/main/sensors/compass.c
|
Oh,I foggot to pull your new code and merge to my code.I will fix it. |
|
|
||
| bool ist8310Detect(magDev_t* mag); | ||
| bool ist8310Init(void); | ||
| bool ist8310Read(int16_t *magData); |
There was a problem hiding this comment.
Init and Read functions do not need to be in the header file, since they are not called directly.
| #define IST8310_CNTRL2_DRPOL 0x04 | ||
| #define IST8310_CNTRL2_DRENA 0x08 | ||
|
|
||
| bool ist8310Detect(magDev_t* mag) |
There was a problem hiding this comment.
Can you make the ist8310Detect the last function in the file, to avoid the need for forward declarations.
| return true; | ||
| } | ||
|
|
||
| bool ist8310Init(void) |
There was a problem hiding this comment.
This function should be static
There was a problem hiding this comment.
OK.I will fix it.Thanks.
| return true; | ||
| } | ||
|
|
||
| bool ist8310Read(int16_t *magData) |
There was a problem hiding this comment.
This function should be static.
| return true; | ||
| } | ||
|
|
||
| bool ist8310Detect(magDev_t* mag) |
There was a problem hiding this comment.
In INAV sensor detection is usually done with retries. Maybe it's better to comply with the remaining drivers just in case of detection hiccup.
There was a problem hiding this comment.
So how do I change?I don't know what your meaning about this.
There was a problem hiding this comment.
See how detection is implemented here: https://github.com/iNavFlight/inav/blob/development/src/main/drivers/compass_mag3110.c#L62-L76
| } | ||
|
|
||
| // need to modify when confirming the pcb direction | ||
| magData[X] = -(int16_t)(buf[1] << 8 | buf[0]) * LSB2FSV; |
There was a problem hiding this comment.
This needs to be done according to datasheet so chip provides valid values according to it's axis, not PCB directions. Chip placement on the PCB in handled using default alignment.
| MAG_MAG3110 = 4, | ||
| MAG_AK8963 = 5, | ||
| MAG_FAKE = 6, | ||
| MAG_IST8310 = 6, |
|
|
||
| #define TARGET_BOARD_IDENTIFIER "FDV1" | ||
|
|
||
| #define CONFIG_START_FLASH_ADDRESS (0x08080000) //0x08080000 to 0x080A0000 (FLASH_Sector_8) |
There was a problem hiding this comment.
Not necessary. Config is stored at top of FLASH according to linker script.
digitalentity
left a comment
There was a problem hiding this comment.
Also, please consider adding board documentation to /docs folder
|
I suggest we consider merging this into 1.5 but don't provide binaries untill board is released and tested. |
|
@digitalentity Got it.I go to fix it. |
|
Also, I will add board documentation latter.But this target code was done. |
|
Superceded by #928 |
|
OK,thanks. |
Describe
Photo