Commit 3e8dadd 1 parent 5f00de8 commit 3e8dadd Copy full SHA for 3e8dadd
File tree 2 files changed +2
-2
lines changed
SecondaryConverter/Firmware/FINAL/PiControllerActivity/PiControllerActivity
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ void calculateError(uint16_t measuredVolt) {
27
27
intError += propError * elapsedTime ; //Calculate the integral error
28
28
29
29
int32_t output = kp * propError + ki * intError ; //Sum errors
30
- setPWM (output );
30
+ // setPWM(output);
31
31
32
32
//errorHasBeenCalc = true; //Set flag to true to adjust pi. Could just call pi adjustment function from here - no need for flags
33
33
}
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ void pwmInit(){
17
17
TCCR0A |= (1 <<WGM01 ) | (1 <<WGM00 ); //Fast PWM mode.
18
18
TCCR0B |= (1 <<CS02 ); // 256x prescaling.
19
19
DDRD |= (1 <<PORTD6 );
20
- OCR0A = 0 ; //Set duty cycle to 0% to begin with
20
+ OCR0A = 128 ; //Set duty cycle to 0% to begin with
21
21
OCR0B = 255 ;
22
22
23
23
}
You can’t perform that action at this time.
0 commit comments