Arduino-FOC icon indicating copy to clipboard operation
Arduino-FOC copied to clipboard

Move Ualpha and Ubeta to FOCMotor

Open Candas1 opened this issue 2 years ago • 8 comments

This is just about moving Ualpha and Ubeta to FOCMotor so it's available to the flux observer sensor.

Candas1 avatar Oct 23 '23 20:10 Candas1

I just forgot it's also used here I keep forgetting about stepper motors. It could be removed from StepperMotor.h then.

Candas1 avatar Oct 23 '23 20:10 Candas1

Hmmm - it looks here like a bunch of the AVR checks are failing. I think we have to look into why before we can merge it...

runger1101001 avatar Oct 29 '23 20:10 runger1101001

Hmmm - it looks here like a bunch of the AVR checks are failing. I think we have to look into why before we can merge it...

Welcome back and thanks for merging the PRs. As I mentioned I forgot to update StepperMotor.h, but I am not sure if it's the reason compilation fails, I will investigate.

I am trying to keep each PR minimal, I hope it's ok.

Candas1 avatar Oct 30 '23 08:10 Candas1

I tried removing Ualpha and Ubeta from StepperMotor.h also and initializing it in FOCMotor.cpp, but no luck. That looks like a very random issue.

I am cursed: https://github.com/arduino/ArduinoCore-avr/issues/341

Candas1 avatar Oct 30 '23 21:10 Candas1

Weird, right? I haven't really figured out what it is...

But in the meantime I have found and fixed the various esp32 compile problems, of which there were several. None of them had anything to do with your changes, as expected.

runger1101001 avatar Oct 30 '23 21:10 runger1101001

If you merge over my recent changes I think that will fix the ESP32 side of things, at least

runger1101001 avatar Oct 31 '23 00:10 runger1101001

Merges all the last dev changes fixed ESP32 compilation as you said, but avr is still failing. So this issue is not so random as I thought.

Candas1 avatar Oct 31 '23 20:10 Candas1

I think it is this: https://stackoverflow.com/questions/8188849/avr-linker-error-relocation-truncated-to-fit

runger1101001 avatar Oct 31 '23 20:10 runger1101001

I think the avr issue is fixed so I'm merging this. :D

askuric avatar Apr 19 '24 17:04 askuric