Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

various fixes: build on Linux etc. #6

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open

Conversation

ec1oud
Copy link

@ec1oud ec1oud commented Jan 7, 2017

These fixes should be OK to merge I think. However there's still something wrong with the usage of the network module: it's basically offline and resetting periodically (due to a watchdog?) So, not sure if I'm still missing something in the Makefile which is necessary to get that working.

This makes the code a little smaller.  If I build with avr-gcc 4.8.2
on Ubuntu, it otherwise ends up just a little too large to fit in flash.
I want to add a ring buffer but memory is tight.
even more PSTR; bit packing of some variables
…type

A switch statement might take memory if the compiler generates a jump table:
http:https://thegaragelab.com/conserving-memory-on-an-avr/
(although it seems to me that it doesn't, with avr-gcc 4.8, at least).
The tube type will not change at runtime; we only need a multiplier
constant, and the name as a string for concatenation.  The compiler
can do string concatenation too, so there's no reason to use
printf("tube %s") to substitute a string which will never change.
This change saves 30 bytes of RAM.
For this we need a ring buffer to remember at least a few samples.
If we want to have a line graph later, we'll need to remember even more.
But more urgently the idea is to find the outliers, which requires
comparing against the mean... this isn't done yet.
cpmMin, cpmMax, cpmAverage
@Wolferl1
Copy link

Wolferl1 commented Jul 20, 2018

I had the same problem with the network module being offline, when I first tried to compile the firmware on a Windows machine. You'll need to use at least sw version 123 to get something valid and working compiled. I couldn't be bothered to find out what the problem behind that was, though.

We'll soon need other buffers storing other types.
This makes possible logging in the field with an Adalogger or some such.
My memory sucks; if I hadn't left the programmer attached to the device,
I'd have forgotten how to connect it for programming, and that I even
had a 3.3V programmer in the first place, and what kind.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants