Skip to content

Anopheles wellcomei

Compare
Choose a tag to compare
@tomcombriat tomcombriat released this 11 Jun 22:19
· 47 commits to master since this release

A new major version, a new mosquito genus!

Mozzi have undergone a fairly big overhaul! Before an automatic changelog, here is an overview of what has changed.

Configuration at the sketch level

The biggest change (at least internally) concerns the way you can configure Mozzi.
Configuration of Mozzi (if desired) is now done in the user sketch itself. This removes the need to fiddle inside Mozzi's sources when using different configurations (EXTERNAL_AUDIO_OUTPUT, STEREO, etc…). For instance in order to use stereo, with an external DAC which timing is controlled by Mozzi, you just need to add:

#include "MozziConfigValues.h"  // for named option values
#define MOZZI_AUDIO_MODE MOZZI_OUTPUT_EXTERNAL_TIMED
#define MOZZI_AUDIO_CHANNELS MOZZI_STEREO

#include <Mozzi.h> // note the change from MozziGuts.h, old fashion still works with a warning

at the top of your sketch. Refer to the examples and the documentation for more on this!

Scaling of analog reads

In order to further improve the compatibility between platforms, the range of the analog reads (mozziAnalogRead) can be explicitly specified:

  • or at the sketch level with the config option: define MOZZI_ANALOG_READ_RESOLUTION 10
  • or/and for every analog reads, for instance: mozziAnalogRead<10>(pin);

Not doing this will fall back on the platform native range (just like Mozzi 1) but will issue a warning (and is not advised).

New fixed point math

A new paradigm for fixed point math arithmetic has been added. This leverages on FixMath which has spawned from Mozzi's development. The goal of this library is to automatized, at the compiler level, the calculations of the range and precision needed for a fixed point type, making coding easier and overflows impossible. Mozzi's functions that were already using fixed point (old paradigm) have been adapted to this! The old way of using fixed point math is still available.

This becomes a requirement for installing Mozzi. If you install Mozzi via the library manager this should be automatically done.

More info on the FixMath page and in Mozzi's examples!

Bugfix/improvements

  • the rate at which updateControl() was called was slightly off. This had only consequences in some very specific cases (#253) but is now corrected (#256)
  • the RP2040 (Raspberry Pico) was not on-tune, this is fixed (#254)
  • twi_nonblock only compiled when needed (#242)
  • some of the ways Mozzi functions internally have been rationalized and improved

Compatibility

This release is not 100% source compatible to earlier versions of Mozzi. Most sketches will continue to compile, but with warnings. Some will need adjustments to keep working. See https://sensorium.github.io/Mozzi/learn/porting/ . If porting is not an option, install an earlier (1.x) version of Mozzi, or use the "Mozzi_1" branch in git.

Change of licence

Mozzi has now changed to LGPL license! (#240)

Changelog

What's Changed

Full Changelog: 1.1.2...v2.0.0

What's Changed

Full Changelog: 1.1.2...v2.0.0