Skip to content

Commit

Permalink
dshot noise and braking improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
AlkaMotors committed Mar 6, 2024
1 parent cd3af91 commit a4f64a1
Show file tree
Hide file tree
Showing 44 changed files with 21,466 additions and 7,906 deletions.
58 changes: 58 additions & 0 deletions Inc/targets.h
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,24 @@
#define ADC_CHANNEL_TEMP ADC_CHANNEL_6
#endif

#ifdef FLYROTOR_150A_F421
#define FIRMWARE_NAME "FLYROTOR_150"
#define FILE_NAME "FLYROTOR_F421"
#define DEAD_TIME 100
#define HARDWARE_GROUP_AT_B
#define HARDWARE_GROUP_AT_450
#define USE_SERIAL_TELEMETRY
#define MILLIVOLT_PER_AMP 19
#define TARGET_VOLTAGE_DIVIDER 190
#define USE_NTC
#define USE_LED_STRIP
#define WS2812_PIN GPIO_PINS_3
#define USE_PULSE_OUT
#define ADC_CHANNEL_CURRENT ADC_CHANNEL_3
#define ADC_CHANNEL_VOLTAGE ADC_CHANNEL_2
#define ADC_CHANNEL_TEMP ADC_CHANNEL_6
#endif

#ifdef HAKRC_K_F421
#define FIRMWARE_NAME "HAKRC F4 K "
#define FILE_NAME "HAKRC_K_F421"
Expand Down Expand Up @@ -376,6 +394,21 @@
#define USE_SERIAL_TELEMETRY
#endif

#ifdef TBS_12S_F421
#define FIRMWARE_NAME "TBS 12S"
#define FILE_NAME "TBS_12S_F421"
#define DEAD_TIME 120
#define HARDWARE_GROUP_AT_C
#define HARDWARE_GROUP_AT_045
#define USE_SERIAL_TELEMETRY
#define ADC_CHANNEL_VOLTAGE ADC_CHANNEL_6
#define ADC_CHANNEL_CURRENT ADC_CHANNEL_3
#define TARGET_VOLTAGE_DIVIDER 210
#define MILLIVOLT_PER_AMP 5
#define RAMP_SPEED_LOW_RPM 1
#define RAMP_SPEED_HIGH_RPM 1
#endif

#ifdef AIKON_SINGLE_F421
#define FIRMWARE_NAME "AIKON S F4 "
#define FILE_NAME "AIKON_SINGLE_F421"
Expand Down Expand Up @@ -436,8 +469,24 @@
#define USE_SERIAL_TELEMETRY
#endif

<<<<<<< Updated upstream
/*****************************************************AT32F415 targets
* ************************************************/
=======

#ifdef AM60_V2_F421
#define FIRMWARE_NAME "F421 Am60 "
#define FILE_NAME "AM60_V2_F421"
#define DEAD_TIME 70
#define HARDWARE_GROUP_AT_B
#define HARDWARE_GROUP_AT_045
#define USE_SERIAL_TELEMETRY
#endif



/*****************************************************AT32F415 targets ************************************************/
>>>>>>> Stashed changes

#ifdef PB450_F051
#define FILE_NAME "PB450_F051"
Expand Down Expand Up @@ -484,6 +533,15 @@
// #define USE_RGB_LED
#endif

#ifdef OCDRC_F051
#define FILE_NAME "OCDRC_F051"
#define FIRMWARE_NAME "OCDRC Esc "
#define DEAD_TIME 45
#define HARDWARE_GROUP_F0_B
#define USE_SERIAL_TELEMETRY
#define USE_RGB_LED
#endif

#ifdef MP6531_F051
#define FILE_NAME "MP6531_F051"
#define FIRMWARE_NAME "Mp6531_Dev "
Expand Down
4 changes: 2 additions & 2 deletions Keil_Projects/AM32_MultiProject.uvmpw
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

<project>
<PathAndName>.\Am32F051.uvprojx</PathAndName>
<NodeIsActive>1</NodeIsActive>
<NodeIsExpanded>1</NodeIsExpanded>
<NodeIsCheckedInBatchBuild>1</NodeIsCheckedInBatchBuild>
</project>

Expand All @@ -31,6 +29,8 @@

<project>
<PathAndName>.\Am32F421.uvprojx</PathAndName>
<NodeIsActive>1</NodeIsActive>
<NodeIsExpanded>1</NodeIsExpanded>
<NodeIsCheckedInBatchBuild>1</NodeIsCheckedInBatchBuild>
</project>

Expand Down
163 changes: 77 additions & 86 deletions Keil_Projects/AM32_MultiProject.uvmpw.uvgui.alkaz

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions Keil_Projects/Am32F031.uvguix.alkaz
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
<View>
<WinId>38003</WinId>
<ViewName>Registers</ViewName>
<TableColWidths>211 100</TableColWidths>
<TableColWidths>202 100</TableColWidths>
</View>
<View>
<WinId>346</WinId>
<ViewName>Code Coverage</ViewName>
<TableColWidths>669 986</TableColWidths>
<TableColWidths>669 564</TableColWidths>
</View>
<View>
<WinId>204</WinId>
<ViewName>Performance Analyzer</ViewName>
<TableColWidths>849 124 124 558</TableColWidths>
<TableColWidths>885 124 124 100</TableColWidths>
</View>
</SECTreeCtrl>

Expand Down Expand Up @@ -68,7 +68,7 @@
</View>
<View>
<WinId>466</WinId>
<ViewName>Source Browser</ViewName>
<ViewName>Source Browser - *** Not Enabled ***</ViewName>
<UserString>500</UserString>
<TableColWidths>300</TableColWidths>
</View>
Expand All @@ -93,25 +93,25 @@
<flags>2</flags>
<showCmd>3</showCmd>
<MinPosition>
<xPos>-1</xPos>
<yPos>-1</yPos>
<xPos>-32000</xPos>
<yPos>-32000</yPos>
</MinPosition>
<MaxPosition>
<xPos>-1</xPos>
<yPos>-1</yPos>
</MaxPosition>
<NormalPosition>
<Top>96</Top>
<Left>182</Left>
<Right>1507</Right>
<Bottom>946</Bottom>
<Top>163</Top>
<Left>554</Left>
<Right>1879</Right>
<Bottom>1013</Bottom>
</NormalPosition>
</WindowPosition>
<MDIClientArea>
<RegID>0</RegID>
<MDITabState>
<Len>1233</Len>
<Data>0100000004000000010000000100000001000000010000000000000002000000000000000100000001000000000000002800000028000000010000000C00000004000000010000003B433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C5372635C6D61696E2E6300000000066D61696E2E6300000000C5D4F200FFFFFFFF42433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C4D63755C663432315C5372635C494F2E630000000004494F2E6300000000FFDC7800FFFFFFFF42433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C4D63755C673037315C5372635C494F2E630000000004494F2E6300000000BECEA100FFFFFFFF3C433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C5372635C6473686F742E6300000000076473686F742E6300000000F0A0A100FFFFFFFF3E433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C496E635C746172676574732E680000000009746172676574732E6800000000BCA8E100FFFFFFFF46433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C4D63755C673037315C5372635C5753323831322E6300000000085753323831322E63000000009CC1B600FFFFFFFF42433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C4D63755C663431355C5372635C494F2E630000000004494F2E6300000000F7B88600FFFFFFFF42433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C4D63755C663035315C5372635C494F2E630000000004494F2E6300000000D9ADC200FFFFFFFF42433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C4D63755C463033315C5372635C494F2E630000000004494F2E6300000000A5C2D700FFFFFFFF42433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C4D63755C653233305C5372635C494F2E630000000004494F2E6300000000B3A6BE00FFFFFFFF3D433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C5372635C7369676E616C2E6300000000087369676E616C2E6300000000EAD6A300FFFFFFFF40433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C5372635C66756E6374696F6E732E63000000000B66756E6374696F6E732E6300000000F6FA7D00FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD500010000000000000002000000B50100007000000080070000DA020000</Data>
<Len>1512</Len>
<Data>0100000004000000010000000100000001000000010000000000000002000000000000000100000001000000000000002800000028000000010000000D00000008000000010000006D433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C4D63755C673037315C447269766572735C53544D3332473078785F48414C5F4472697665725C5372635C73746D3332673078785F6C6C5F7263632E63000000001273746D3332673078785F6C6C5F7263632E6300000000C5D4F200FFFFFFFF42433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C4D63755C673037315C5372635C494F2E630000000004494F2E6300000000FFDC7800FFFFFFFF3D433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C5372635C7369676E616C2E6300000000087369676E616C2E6300000000BECEA100FFFFFFFF3E433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C496E635C746172676574732E680000000009746172676574732E6800000000F0A0A100FFFFFFFF5C433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C4D63755C663432315C447269766572735C647269766572735C7372635C61743332663432315F746D722E63000000000E61743332663432315F746D722E6300000000BCA8E100FFFFFFFF4B433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C4D63755C663432315C5372635C7065726970686572616C732E63000000000D7065726970686572616C732E63000000009CC1B600FFFFFFFF50433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C4D63755C663432315C5372635C73657269616C5F74656C656D657472792E63000000001273657269616C5F74656C656D657472792E6300000000F7B88600FFFFFFFF46433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C4D63755C663432315C5372635C5753323831322E6300000000085753323831322E6300000000D9ADC200FFFFFFFF3B433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C5372635C6D61696E2E6300000000066D61696E2E6300000000A5C2D700FFFFFFFF4A433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C4D63755C663432315C5372635C636F6D70617261746F722E63000000000C636F6D70617261746F722E6300000000B3A6BE00FFFFFFFF4B433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C4D63755C663432315C5372635C61743332663432315F69742E63000000000D61743332663432315F69742E6300000000EAD6A300FFFFFFFF43433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C4D63755C663432315C5372635C4144432E6300000000054144432E6300000000F6FA7D00FFFFFFFF4B433A5C55736572735C616C6B617A5C4F6E6544726976655C446F63756D656E74735C414D33325F4D554C54495F4D43555C6D63755C663432315C496E635C7065726970686572616C732E68000000000D7065726970686572616C732E6800000000B5E99D00FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD500010000000000000002000000B50100007000000080070000DA020000</Data>
</MDITabState>
</MDIClientArea>
<ViewEx>
Expand Down Expand Up @@ -3605,7 +3605,7 @@
<Size>100</Size>
<ActiveTab>1</ActiveTab>
<Doc>
<Name>C:\Users\alkaz\OneDrive\Documents\AM32_MULTI_MCU\Inc\targets.h</Name>
<Name>&lt;1&gt;..\Inc\targets.h</Name>
<ColumnNumber>19</ColumnNumber>
<TopLine>648</TopLine>
<CurrentLine>654</CurrentLine>
Expand Down
Loading

0 comments on commit a4f64a1

Please sign in to comment.