awonak / EuroPiGo

Alternate firmware for the Allen Synthesis EuroPi written in Go
MIT License
4 stars 2 forks source link

Large update/upgrade #6

Open heucuva opened 1 year ago

heucuva commented 1 year ago

Preface

I'm really sorry this took so long to get ready for a real Pull Request. There were a lot of features I wanted to have available and things sort of spiraled out of hand a bit. I hope you understand and bear with me on this one, as I really do think this is the start of something great for the project. I promise that future PRs won't be behemoths like this one, but more pruned and targeted solutions.

Added

Fixed or Changed

Notes

heucuva commented 1 year ago

one of the major roadblocks I had previously hit was the poor accuracy of cv from the PWM output. I'm wondering if you had noticed the same issue and if your changes have helped improve the quality of PWM output?

The main concern is that the RP2040 likes 32bit sizes for its floating point and most of the code is built around that (general use case performance is actually a major consideration point on this project) - with 32bit floats, we run into a problem of gaps in PWM values. It's not an impossible thing to solve, but it does mean reworking how duty cycle is calculated, focusing more on accuracy than fast calculation. Maybe we can replace the calc with a partial lookup table instead? That would certainly help where accuracy is concerned, however it would eat a bit of available memory/storage space (not that I've ever come across that concern in my testing/hacking)

heucuva commented 1 year ago

I am following some of the guidelines and conventions from the official EuroPi repo's contributing guide, so please take a look at this doc: https://github.com/Allen-Synthesis/EuroPi/blob/main/contributing.md#overview

One of the issues with the organization layout is that if we are going to eventually run CI pipelines on the codebase for unit tests, then we'll need to put module projects (which have main package names) under the /internal directory. Can't have more than one main - as a hard and fast rule of Go - unless they live under /internal somewhere.

heucuva commented 1 year ago

Made a bunch of changes and improvements for memory utilization. Still need to make a pass on the documentation.