Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dm6300 mixer enable fast charging #176

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/dm6300.c
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ void DM6300_init3(uint8_t ch) {
CODE_SEG const dm6300_reg_value_t dm6300_init4_regs[] = {
// 04_TX_CA1_RF
{0x6, 0xFF0, 0x00000018},
{0x3, 0x31C, 0x00000000}, // 0x00000030
{0x3, 0x31C, 0x00000030}, // 0x00000030
{0x3, 0x300, 0xC000281B},
{0x3, 0x304, 0x0CC00006},
{0x3, 0x308, 0x00000000},
Expand All @@ -638,7 +638,7 @@ CODE_SEG const dm6300_reg_value_t dm6300_init4_regs[] = {
{0x3, 0x32C, 0x00000000},
{0x3, 0x330, 0x00000000}, // remove init DC high
{0x3, 0x334, 0x00000000},
{0x3, 0x31C, 0x00000011},
{0x3, 0x31C, 0x00000010},
};

void DM6300_init4() {
Expand Down
28 changes: 28 additions & 0 deletions src/msp_displayport.c
Original file line number Diff line number Diff line change
Expand Up @@ -2072,4 +2072,32 @@ void msp_set_vtx_config(uint8_t power, uint8_t save) {
(void)save;
}

uint8_t bfChannel_to_channel(uint8_t const channel) {
if (channel == 16)
return 8;
if (channel == 24)
return 9;
if (channel == 25)
return 10;
else if (channel == 27)
return 11;
else if (channel >= 32 && channel < 40)
return channel - 32;
return INVALID_CHANNEL;
}

uint8_t channel_to_bfChannel(uint8_t const channel) {

if (channel < 8)
return channel + 32; // R1...R8
if (channel == 8)
return 16; // E1
if (channel == 9)
return 24; // F1
if (channel == 10)
return 25; // F2
if (channel == 11)
return 27; // F4
return INVALID_CHANNEL;
}
#endif