Skip to content

Commit 7b8bb49

Browse files
Merge pull request #241 from runger1101001/dev
Several small bug fixes
2 parents e9ac395 + 49f325e commit 7b8bb49

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/common/base_classes/FOCMotor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ FOCMotor::FOCMotor()
3636
//monitor_port
3737
monitor_port = nullptr;
3838
//sensor
39+
sensor_offset = 0.0f;
3940
sensor = nullptr;
4041
//current sensor
4142
current_sense = nullptr;

src/current_sense/hardware_specific/rp2040/rp2040_mcu.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,9 @@ bool RP2040ADCEngine::init() {
151151
for (int i = 3; i>=0; i--) {
152152
if (channelsEnabled[i]){
153153
adc_gpio_init(i+26);
154-
enableMask |= 0x01;
154+
enableMask |= (0x01<<i);
155155
channelCount++;
156156
}
157-
enableMask = (enableMask<<1);
158157
}
159158
adc_set_round_robin(enableMask);
160159
adc_fifo_setup(

0 commit comments

Comments
 (0)