Skip to content

Add support for FishDrone_INAV board#919

Closed
Linjieqiang wants to merge 14 commits intoiNavFlight:developmentfrom
Linjieqiang:FishDrone_INAV
Closed

Add support for FishDrone_INAV board#919
Linjieqiang wants to merge 14 commits intoiNavFlight:developmentfrom
Linjieqiang:FishDrone_INAV

Conversation

@Linjieqiang
Copy link
Copy Markdown
Contributor

@Linjieqiang Linjieqiang commented Dec 13, 2016

Describe

  • MCU : STM32F405RGT6
  • Sensor
    • Acc : IST-20608
    • Gyro : IST-20608
    • Baro : MS5611
    • Compass : IST-8310
  • UART
    • UART1 for Telemetry
    • UART2 for RX receiver
    • UART3 for Sonar or others
    • UART5 for GPS
  • OSD : support (MAX7456)
  • Blackbox : 16MB FLASH & TF
  • External IIC BUS support (you can connect to other sensor)
  • Button : enter DFU mode
  • 6 PWM Input support(Also you can use PPM or SBUS)
  • 6 PWM Output support
  • SWD support
  • Beeper support
  • ADC :
    • RSSI
    • VBAT
    • Current

Photo

image

image

image

@digitalentity digitalentity changed the base branch from master to development December 13, 2016 11:45
@digitalentity digitalentity added this to the 1.6 milestone Dec 13, 2016
@digitalentity
Copy link
Copy Markdown
Member

@Linjieqiang please rebase on development branch.

@Linjieqiang
Copy link
Copy Markdown
Contributor Author

@digitalentity OK.

@Linjieqiang
Copy link
Copy Markdown
Contributor Author

@digitalentity Can you merge this in V1.5 nor V1.6?I will go on the code update and the board was tested OK.

@digitalentity
Copy link
Copy Markdown
Member

Please rebase on development branch. If this PR will only add a new compass driver - it should be safe to merge into 1.5

@Linjieqiang Linjieqiang mentioned this pull request Dec 13, 2016
@Linjieqiang
Copy link
Copy Markdown
Contributor Author

@digitalentity OK.I go on my work for this pr.

@digitalentity
Copy link
Copy Markdown
Member

@Linjieqiang please consider rebasing against development before making any more changes. I can't merge this PR unless it's done against development branch.

@Linjieqiang
Copy link
Copy Markdown
Contributor Author

Oh,Sorry.That's my fault.

@digitalentity
Copy link
Copy Markdown
Member

I'm trying to save you some time. Changes between development and master are big and with more commits a rebase will become more and more complicated task.

@Linjieqiang
Copy link
Copy Markdown
Contributor Author

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
@Linjieqiang
Copy link
Copy Markdown
Contributor Author

@digitalentity Can you review my code again?Is that ok?

@digitalentity
Copy link
Copy Markdown
Member

Still merge conflicts in compass.c

@Linjieqiang
Copy link
Copy Markdown
Contributor Author

But I didn't find out what conflicts in compass.c between two repertories.

@digitalentity
Copy link
Copy Markdown
Member

<<<<<<< FishDrone_INAV
        case MAG_IST8310:
#ifdef USE_MAG_IST8310
            if (ist8310Detect(dev)) {
#ifdef MAG_IST8310_ALIGN
                dev->magAlign = MAG_IST8310_ALIGN;
#endif
                magHardware = MAG_IST8310;
            }
#endif
            break;

        case MAG_FAKE:
=======
    case MAG_FAKE:
>>>>>>> development

@Linjieqiang
Copy link
Copy Markdown
Contributor Author

Oh,I foggot to pull your new code and merge to my code.I will fix it.

Comment thread src/main/drivers/compass_ist8310.h Outdated

bool ist8310Detect(magDev_t* mag);
bool ist8310Init(void);
bool ist8310Read(int16_t *magData);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Init and Read functions do not need to be in the header file, since they are not called directly.

Comment thread src/main/drivers/compass_ist8310.c Outdated
#define IST8310_CNTRL2_DRPOL 0x04
#define IST8310_CNTRL2_DRENA 0x08

bool ist8310Detect(magDev_t* mag)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you make the ist8310Detect the last function in the file, to avoid the need for forward declarations.

Comment thread src/main/drivers/compass_ist8310.c Outdated
return true;
}

bool ist8310Init(void)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This function should be static

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK.I will fix it.Thanks.

Comment thread src/main/drivers/compass_ist8310.c Outdated
return true;
}

bool ist8310Read(int16_t *magData)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This function should be static.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK.I see.

Comment thread src/main/drivers/compass_ist8310.c Outdated
return true;
}

bool ist8310Detect(magDev_t* mag)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

So how do I change?I don't know what your meaning about this.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK.

Comment thread src/main/drivers/compass_ist8310.c Outdated
}

// need to modify when confirming the pcb direction
magData[X] = -(int16_t)(buf[1] << 8 | buf[0]) * LSB2FSV;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Got it.

MAG_MAG3110 = 4,
MAG_AK8963 = 5,
MAG_FAKE = 6,
MAG_IST8310 = 6,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Indentation - 4 spaces

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Got it.

Comment thread src/main/target/FishDroneF4NAV/target.h Outdated

#define TARGET_BOARD_IDENTIFIER "FDV1"

#define CONFIG_START_FLASH_ADDRESS (0x08080000) //0x08080000 to 0x080A0000 (FLASH_Sector_8)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not necessary. Config is stored at top of FLASH according to linker script.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Got it.

Copy link
Copy Markdown
Member

@digitalentity digitalentity left a comment

Choose a reason for hiding this comment

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

Also, please consider adding board documentation to /docs folder

@digitalentity
Copy link
Copy Markdown
Member

I suggest we consider merging this into 1.5 but don't provide binaries untill board is released and tested.

@Linjieqiang
Copy link
Copy Markdown
Contributor Author

@digitalentity Got it.I go to fix it.

@Linjieqiang
Copy link
Copy Markdown
Contributor Author

Also, I will add board documentation latter.But this target code was done.

@digitalentity
Copy link
Copy Markdown
Member

Superceded by #928

@Linjieqiang
Copy link
Copy Markdown
Contributor Author

OK,thanks.

@Linjieqiang Linjieqiang deleted the FishDrone_INAV branch March 24, 2017 03:16
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.

3 participants