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

feat(ESP32): upgrade toolchain #138

Merged
merged 2 commits into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions arch/esp32/esp32.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[arch:esp32]
platform = platformio/espressif32@^6.8.1
platform_packages =
toolchain-xtensa-esp32@12.2.0+20230208
espressif/tool-xtensa-esp-elf-gdb@12.1.0+20221002
framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.3
framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.3/esp32-arduino-libs-3.0.3.zip
platformio/toolchain-xtensa-esp-elf@13.2.0+20240530
platformio/tool-xtensa-esp-elf-gdb@14.2.0+20240403
framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.4
framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.4/esp32-arduino-libs-3.0.4.zip

build_flags =
-D SS_USE_NIMBLE=true
Expand Down
27 changes: 12 additions & 15 deletions lib/io/senseshift/input/filter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,21 +145,18 @@ class MultiplyFilter : public IFilter<Tp> {
Tp factor_;
};

class VoltageDividerFilter : public MultiplyFilter<float> {
public:
/// Calculates the original voltage from the voltage divider.
///
/// \param r1 The resistance in Ohms of the first resistor in the voltage divider.
/// Example: 27000.0F.
/// \param r2 The resistance in Ohms of the second resistor in the voltage divider.
/// Example: 100000.0F.
///
/// \example
/// \code
/// new VoltageDividerFilter(27000.0F, 100000.0F);
/// \endcode
explicit VoltageDividerFilter(float r1, float r2) : MultiplyFilter<float>((r1 + r2) / r2){};
};
/// Calculates the original voltage from the voltage divider.
///
/// \param r1 The resistance in Ohms of the first resistor in the voltage divider.
/// Example: 27000.0F.
/// \param r2 The resistance in Ohms of the second resistor in the voltage divider.
/// Example: 100000.0F.
///
/// \example
/// \code
/// new VoltageDividerFilter(27000.0F, 100000.0F);
/// \endcode
#define VoltageDividerFilter(r1, r2) MultiplyFilter((r1 + r2) / r2)

template<typename Tp>
class ClampFilter : public IFilter<Tp> {
Expand Down
Loading