Skip to content

Conversation

@helloradiosky
Copy link
Contributor

@helloradiosky helloradiosky commented Apr 13, 2025

Fixes #
Clean up redundant code and eliminate code compilation warnings.

Summary of changes:

1.Redefine the V14 toggle switch
2.Increase voltage measurement for V12 and V14
3.Add voice recognition chip drivers to V14 and V16
4.Add gyroscope chip driver to V14 and V16
5.Add self check function for the startup GIMBAL RGB
6.Place the common driver in the target folder/targets/common
7.Correct the macro definition of V12
8.Revise the definition of V16 RTC voltage conversion value

helloradiosky and others added 7 commits March 18, 2025 17:43
1.Redefine the V14 toggle switch
2.Increase voltage measurement for V12 and V14
3.Add voice recognition chip drivers to V14 and V16
4.Add gyroscope chip driver to V14 and V16
5.Add self check function for the startup GIMBAL RGB
6.Place the common driver in the target folder/targets/common
7.Correct the macro definition of V12
2.Increase voltage measurement for V12 and V14
3.Add voice recognition chip drivers to V14 and V16
4.Add gyroscope chip driver to V14 and V16
5.Add self check function for the startup GIMBAL RGB
6.Place the common driver in the target folder/targets/common
7.Correct the macro definition of V12
There are some minor differences, but it should still work as is, or will need the I2C_Bus_1 lines updated for V16
2.V14 needs to use 660 to retrieve RTC data, and the display will be correct
Comment on lines +82 to +86
#if defined(CI1302_SENSOR)
.name = "Voice",
#else
.name = "AUX1",
#endif
Copy link
Member

Choose a reason for hiding this comment

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

Obviously, you don't want this serial port to be configurable. This means that you want to define it directly in a board specific driver instead of adding it to generic configurable serial ports.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I want to demonstrate my special functional characteristics, so it seems that I cannot implement these functions in this way

Comment on lines +235 to +239
#if defined(CI1302_SENSOR)
processVoiceInput();
processUpdataInput();
#endif

Copy link
Member

Choose a reason for hiding this comment

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

Use a FreeRTOS timer instead, started from your own board drivers.

Comment on lines +72 to +74
#if defined(GYRO_SENSOR)
#include "imu_42627.h"
#endif
Copy link
Member

Choose a reason for hiding this comment

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

Is this really needed here?

Comment on lines +151 to +160
#if defined(HR_GIMBAL_RGB)
splashStartTime=get_tmr10ms();
if(SPLASH_TIMEOUT<(6000/10)) //time expand GIMBAL_RGB init loop
splashStartTime+=6000/10;
else
splashStartTime += SPLASH_TIMEOUT;
#else
splashStartTime += SPLASH_TIMEOUT;
#endif

Copy link
Member

Choose a reason for hiding this comment

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

This should really not be here. What are you trying to achieve?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I want to demonstrate my special functional characteristics, so it seems that I cannot implement these functions in this way

Comment on lines +173 to +176
#if defined(HR_GIMBAL_RGB)
rbgInitLoop(1);
ws2812update();
#endif
Copy link
Member

Choose a reason for hiding this comment

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

This should really not be here. If you want to implement some gimmick for your particular radio, this will have to be done differently.

Copy link
Member

Choose a reason for hiding this comment

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

This file does not contain anything generic enough to be in this directory. Besides, this code is definitely not up to any reasonable coding standards.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just can't customize and showcase my own special features independently, so I have to delete them

Copy link
Member

Choose a reason for hiding this comment

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

same as gimbal_rgb.cpp

Copy link
Member

Choose a reason for hiding this comment

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

This code is definitely not up to any reasonable coding standards. Besides, it does not even mention which chip this is for.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can I create a completely private folder in the 'Target' folder to manage my feature files

Copy link
Member

Choose a reason for hiding this comment

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

same as imu4.cpp

Copy link
Member

Choose a reason for hiding this comment

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

This code is definitely not up to any reasonable coding standards. Besides, which chip or chip family is this even covering?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems that I should temporarily give up these features and debug the general functions first. Now these are a big challenge for me

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants