diff --git a/.gitignore b/.gitignore index 974cbbb..067a810 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,362 @@ -*.3mf +*.sublime-* +wifi_credentials.h +.pio/ +.vscode/ +data/config.json + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +.pioenvs +.piolibdeps +.clang_complete +.gcc-flags.json +.pio \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index b745a08..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +0,0 @@ -[submodule "software/libmapper_arduino"] - path = software/libmapper_arduino - url = https://github.com/mathiasbredholt/libmapper_arduino.git -[submodule "software/TorqueTuner-ESP32"] - path = software/TorqueTuner-ESP32 - url = https://github.com/MathiasKirkegaard92/TorqueTuner-ESP32.git -[submodule "software/Mechaduino-firmware"] - path = software/Mechaduino-firmware - url = https://github.com/MathiasKirkegaard92/Mechaduino-firmware.git diff --git a/3d-printing/.DS_Store b/3d-printing/Mechaduino Models/.DS_Store similarity index 100% rename from 3d-printing/.DS_Store rename to 3d-printing/Mechaduino Models/.DS_Store diff --git a/3d-printing/.gitattributes b/3d-printing/Mechaduino Models/.gitattributes similarity index 100% rename from 3d-printing/.gitattributes rename to 3d-printing/Mechaduino Models/.gitattributes diff --git a/3d-printing/2mm_standoff.stl b/3d-printing/Mechaduino Models/2mm_standoff.stl similarity index 100% rename from 3d-printing/2mm_standoff.stl rename to 3d-printing/Mechaduino Models/2mm_standoff.stl diff --git a/3d-printing/T-stick-adapter/.DS_Store b/3d-printing/Mechaduino Models/T-stick-adapter/.DS_Store similarity index 100% rename from 3d-printing/T-stick-adapter/.DS_Store rename to 3d-printing/Mechaduino Models/T-stick-adapter/.DS_Store diff --git a/3d-printing/T-stick-adapter/Housing.stl b/3d-printing/Mechaduino Models/T-stick-adapter/Housing.stl similarity index 100% rename from 3d-printing/T-stick-adapter/Housing.stl rename to 3d-printing/Mechaduino Models/T-stick-adapter/Housing.stl diff --git a/3d-printing/T-stick-adapter/ShaftMount_5.5nutsize.stl b/3d-printing/Mechaduino Models/T-stick-adapter/ShaftMount_5.5nutsize.stl similarity index 100% rename from 3d-printing/T-stick-adapter/ShaftMount_5.5nutsize.stl rename to 3d-printing/Mechaduino Models/T-stick-adapter/ShaftMount_5.5nutsize.stl diff --git a/3d-printing/T-stick-adapter/T-stick Coupling.stl b/3d-printing/Mechaduino Models/T-stick-adapter/T-stick Coupling.stl similarity index 100% rename from 3d-printing/T-stick-adapter/T-stick Coupling.stl rename to 3d-printing/Mechaduino Models/T-stick-adapter/T-stick Coupling.stl diff --git a/3d-printing/desktop-standalone/.DS_Store b/3d-printing/Mechaduino Models/desktop-standalone/.DS_Store similarity index 100% rename from 3d-printing/desktop-standalone/.DS_Store rename to 3d-printing/Mechaduino Models/desktop-standalone/.DS_Store diff --git a/3d-printing/desktop-standalone/Case.stl b/3d-printing/Mechaduino Models/desktop-standalone/Case.stl similarity index 100% rename from 3d-printing/desktop-standalone/Case.stl rename to 3d-printing/Mechaduino Models/desktop-standalone/Case.stl diff --git a/3d-printing/desktop-standalone/Lid.stl b/3d-printing/Mechaduino Models/desktop-standalone/Lid.stl similarity index 100% rename from 3d-printing/desktop-standalone/Lid.stl rename to 3d-printing/Mechaduino Models/desktop-standalone/Lid.stl diff --git a/3d-printing/knobs/ShuttleKnob_rev4_Curved.stl b/3d-printing/Mechaduino Models/knobs/ShuttleKnob_rev4_Curved.stl similarity index 100% rename from 3d-printing/knobs/ShuttleKnob_rev4_Curved.stl rename to 3d-printing/Mechaduino Models/knobs/ShuttleKnob_rev4_Curved.stl diff --git a/3d-printing/knobs/ShuttleKnobrev3Grip.stl b/3d-printing/Mechaduino Models/knobs/ShuttleKnobrev3Grip.stl similarity index 100% rename from 3d-printing/knobs/ShuttleKnobrev3Grip.stl rename to 3d-printing/Mechaduino Models/knobs/ShuttleKnobrev3Grip.stl diff --git a/3d-printing/knobs/ShuttleKnobrev3NOGrip.stl b/3d-printing/Mechaduino Models/knobs/ShuttleKnobrev3NOGrip.stl similarity index 100% rename from 3d-printing/knobs/ShuttleKnobrev3NOGrip.stl rename to 3d-printing/Mechaduino Models/knobs/ShuttleKnobrev3NOGrip.stl diff --git a/3d-printing/psu_bottom v4.stl b/3d-printing/psu_bottom v4.stl new file mode 100644 index 0000000..368d7d5 Binary files /dev/null and b/3d-printing/psu_bottom v4.stl differ diff --git a/3d-printing/psu_top.stl b/3d-printing/psu_top.stl new file mode 100644 index 0000000..c00bba9 Binary files /dev/null and b/3d-printing/psu_top.stl differ diff --git a/3d-printing/stub v1.stl b/3d-printing/stub v1.stl new file mode 100644 index 0000000..960eb7b Binary files /dev/null and b/3d-printing/stub v1.stl differ diff --git a/3d-printing/torquetuner_module_bottom v16.stl b/3d-printing/torquetuner_module_bottom v16.stl new file mode 100644 index 0000000..4e5aa8f Binary files /dev/null and b/3d-printing/torquetuner_module_bottom v16.stl differ diff --git a/3d-printing/torquetuner_module_top v16.stl b/3d-printing/torquetuner_module_top v16.stl new file mode 100644 index 0000000..f41e43b Binary files /dev/null and b/3d-printing/torquetuner_module_top v16.stl differ diff --git a/Docs/Build_guide_v1.md b/Docs/Build_guide_v1.md new file mode 100644 index 0000000..e829d69 --- /dev/null +++ b/Docs/Build_guide_v1.md @@ -0,0 +1,74 @@ +# Building a Torquetuner Module (v1.0) + +## Bill of Materials + +Qty | Description +------|--------------------- +01 | [Moteus Development Kit](https://shop.bela.io/products/trill-craft/) +01 | [TinyPICO](https://www.adafruit.com/product/4335) +01 | [Adafruit LCD I2C Shield Kit](https://www.adafruit.com/product/714) +01 | [5V Step up Regulator](https://www.robotshop.com/ca/en/5v-1a-step-up-step-down-voltage-regulator-s13v10f5.html) +01 | [JST - ZHR 4 pin cable ](https://www.robotshop.com/ca/en/breadboard-to-jst-zhr-cable-4-pin-x-15mm-pitch.html) +08 | M2 Screws +24 | 12x1.5mm Magnets + +### Printing and preparing the Parts + +Print one of each of the [3d printing files](../3D_printing/). Unscrew the Moteus board from its stand. +#### Firmware + +Instructions to upload (flash) the Torquetuner and the Moteus board firmware and configuration files can be found [here](./Firmware_update_instructions.md). + +Read and follow __ALL__ the instructions at before upload it to the board. There are some steps to prepare your machine and the ESP32 before flash it for the first time. + +### Glueing Magnets + +Glue magnets to the bottom of the electronics case and the top of the PSU case. These magnets need to be able to connect together. + +![magnetsoncase](/images/magnets.jpg "magnets on the bottom of case") +Figure 1: Magnets on the power supply and electronics case +### Soldering Components +![Overview](/images/torquetuner_overview.jpg "3d printing overview") +Figure 2: All the electronic components + +1. Start with the Moteus board. +2. Solder a wire from a wire from the 3V pin to the VIN pin on the regulator. +3. Screw the moteus board onto the top plate of the electronics case. + +![moteusoncase](/images/moteus_onplate.jpg "moteus board on case") +Figure 3: Moteus board screwed onto the top plate of the electronics case. + +4. Assemble the Adafruit LCD I2C Shield according to the [instructions](https://learn.adafruit.com/rgb-lcd-shield/assembly) given on the adafruit website. If your M2 Screws are too short, you can screw the shield onto the case before soldering the LCD as shown in figure 4. + +![finisedLCD](/images/assembled_TopPlate.jpg "lcd and moteus board on case") +Figure 4: Moteus board and Adafruit LCD I2C shield screwed onto the top plate of the electronics case. + +5. Connect the JST-ZHR cable to the moteus board. The pins from the JST ZH cable (from left-to-right, that is starting closest to the ABS label on the board) are: +3.3V - SCL - SDA - GND +6. Solder the 3.3V pin to the 3.3V pin on the TinyPico. +7. Twist another wire onto the SCL, SDA and GND wires. We will use solder these extra wires onto the LCD shield +8. Solder wires for SDA, SCL, GND and 5V as shown the __Detached Usage__ section on the [Adafruit product page](https://learn.adafruit.com/rgb-lcd-shield/using-the-rgb-lcd-shield). +9. Solder the 5V wire to the VOUT pin on the 5V regulator +10. Solder the a wire from the GND pin of the 5V regulator to the other ground pin on the TinyPico. +11. Solder the SDA, SCL and GND wires coming from the Moteus board and the LCD Shield onto pins 21, 22 and GND respectively on the TinyPico. +12. Slot the TinyPico on the opening. +13. Attach the Stub at the end to stop the TinyPico from sliding out of the opening. +14. Close the electronics case and screw 4 M2 screws on top of the case. +15. Power on the motor to test the LCD turns on. Note you may need to change the contrast in order to see the words on the LCD. + +![finishedTorquetuner](/images/torquetuner_finished.jpg "lcd and moteus board on case") +Figure 5: Completed Torquetuner module + + +## Document info + +Version 1.0: Albert-Ngabo Niyonsenga - albert-ngabo.niyonsenga@mail.mcgill.ca + +__Input Devices and Music Interaction Laboratory__ +http://www.idmil.org\ +Schulich School of Music\ +McGill University\ +550 Rue Sherbrooke Ouest, Suite 500\ +Montreal, QC, H3A 1E\ +Canada + diff --git a/Docs/Firmware_update_instructions.md b/Docs/Firmware_update_instructions.md new file mode 100644 index 0000000..3c07fcb --- /dev/null +++ b/Docs/Firmware_update_instructions.md @@ -0,0 +1,103 @@ +# Torquetuner Firmware Update Guide (firmware version: 20221020) + +- [Torquetuner (Firmware version: 20221020)](#torquetuner-firmware-update-guide-firmware-version-20221020) + - [First time firmware upload instructions](#first-time-firmware-upload-instructions) + - [Flash Moteus Board](#flash-moteus-board) + - [Recompiling the Moteus firmware](#recompiling-the-moteus-firmware) + - [Setup flash with debug USB stick:](#setup-flash-with-debug-usb-stick) + - [Flash TinyPico Board](#flash-tinypico-board) + - [Install PlatformIO](#install-platformio) + - [Clone the Torquetuner repository](#clone-the-torquetuner-repository) + - [Open software project and flash it to the Torquetuner](#open-software-project-and-flash-it-to-the-torquetuner) + - [Test Torquetuner](#test-torquetuner) + - [Other Documentation](#other-documentation) + - [Firmware information](#firmware-information) + +## First time firmware upload instructions +[Modified from the T-Stick firmware update instructions](https://github.com/aburt2/T-Stick/blob/master/Docs/Firmware_update_instructions.md) +_INSTALL ALL DEPENDENCIES AND REAL ALL OBSERVATIONS BEFORE UPLOAD !_ +### Flash Moteus Board + +#### Recompiling the Moteus firmware: +1. Install [OpenOCD](https://openocd.org/pages/getting-openocd.html) on your device. +2. Clone moteus: https://github.com/IDMIL/Moteus/tree/RotaRep branch. +3. In the `moteus` directory, build the moteus firmware: +``` +tools/bazel build --config=target //:target --verbose_failures +``` +4. (optional) test `tools/bazel test --config=target //:target` + +#### Setup flash with debug USB stick: + +5. Connect the power cable to power input of the controller (with the power supply unplugged from the wall). +6. Connect the canfd connector to the controller. +7. Connect the fdcanusb to the usb port of the PC. +8. You may now plug the power supply into the wall. +9. A green light on the controller should now appear. +10. Connect the USB stick to the board using the JST ZH-6 and plug in the USB stick into the computer. + +11. Flash with debug USB stick: `./fw/flash.py` + +Upon succesful flash, the following lines will be output: +``` +** Programming Finished ** +** Verify Started ** +** Verified OK ** +** Resetting Target ** +... +shutdown command invoked +``` + +Note: if you encounter the error message: +``` +Info : STLINK V2J29S7 (API v2) VID:PID 0483:3748 +Info : Target voltage: 3.223809 +Error: init mode failed (unable to connect to the target) +``` +check the different connections related to the power supply. + +10. Install tview using pip: `pip install moteus-gui` +11. Launch Moteus GUI: `python -m moteus_gui.tview --devices=1` +12. In the Moteus GUI, check the I2C state and status: +``` +d i2c.state +d i2c.status +``` +For now state should be READY or LISTEN and status ERROR or BUSY (with no other i2c device connected). + +### Flash TinyPico Board + +#### Install PlatformIO + +1. To download and install PlatformIO, follow the instructions at [https://platformio.org/platformio-ide](https://platformio.org/platformio-ide). We recomment using PlatformIO under Visual Studio Code, but you can also choose another editor. + +#### Clone the Torquetuner repository + +2. Clone this repository using `git clone https://github.com/IDMIL/TorqueTuner.git`. Alternatively, you can download the repository as a zip file at [https://github.com/IDMIL/TorqueTuner](https://github.com/IDMIL/TorqueTunerk). Take note of the folder location. + +#### Open software project and flash it to the Torquetuner + +3. Open the Torquetuner **software** folder in VSC/PlatformIO. You can get help on how to use PlatformIO at [https://docs.platformio.org/en/latest/core/quickstart.html](https://docs.platformio.org/en/latest/core/quickstart.html) +4. Open the `config.json` file in the Data folder to make changes before uploading. +5. If it is the first time flashing, you may see an error pointing to the ESP32 inet.h file. The file requires manual fixing. Check the issue at [https://github.com/mathiasbredholt/libmapper-arduino/issues/3](https://github.com/mathiasbredholt/libmapper-arduino/issues/3) + +When ready, you need to flash both the firmware and the filesystem image. Choose the proper platform accordingly (*tinypico*) and use the PlatformIO menu to flash the image to the Torquetuner. + +#### Test Torquetuner + +After flashing, you can use the VSC/PlatformIO serial monitor to check if the Torquetuner module is booting properly. You should see Torquetuner booting process. + +You can also interact with the controller using the following commands: + +- 'reboot' to reboot + +## Other Documentation + +[Torquetuner connection guide – v1.0](./connection_guide_v1.md) + +[How to build a Torquetuner Module](./Build_guide_v1.md) + +## Firmware information + +Torquetuner V1 - TinyPico - USB - WiFi +Input Devices and Music Interaction Laboratory (IDMIL) diff --git a/Docs/TorquetunerOSC.md b/Docs/TorquetunerOSC.md new file mode 100644 index 0000000..e0ead6b --- /dev/null +++ b/Docs/TorquetunerOSC.md @@ -0,0 +1,9 @@ +# Torquetuner OSC Namespace + +## firmware 20221020 +Torquetuner_XXX/instrument/angle_out,i 0--3600 +Torquetuner_XXX/instrument/velocity,f -700--700 +Torquetuner_XXX/instrument/trigger,i 0,1 +Torquetuner_XXX/instrument/speed,f 0--700 +Torquetuner_XXX/instrument/angle_d,iscrete,i 0--3600 +Torquetuner_XXX/instrument/accl,f -100--100 diff --git a/Docs/connection_guide_v1.md b/Docs/connection_guide_v1.md new file mode 100644 index 0000000..cf167cd --- /dev/null +++ b/Docs/connection_guide_v1.md @@ -0,0 +1,32 @@ +# Torquetuner Connection Guide V1.0 + +## Option 1: Wireless Connection +### Get your network details +1. Connect to the network you will be connecting the Torquetuner module to. +2. Note the SSID (network name) and SSID Password (network password). +3. Get your computers IP address while connected to this network. Below are linked some support articles for Windows and MacOS on how to find your computers IP address. + - [Find your IP Address Windows](https://support.microsoft.com/en-us/windows/find-your-ip-address-in-windows-f21a9bbc-c582-55cd-35e0-73431160a1b9) + - [Find your IP Address MacOS](https://discussions.apple.com/thread/253927735) + - [Find your IP Address Linux](https://opensource.com/article/18/5/how-find-ip-address-linux) + +### Connect to the Torquetuner Module. +4. Power on your Torquetuner module and wait until the boot sequence is complete. +5. Connect to the TorqueTuner_XXX wifi where XXX is the ID of the Torquetuner module. ie: TorqueTuner_001. By default the password is mappings. +6. Open your browser and go to [http://TorqueTuner_XXX.local/](http://TorqueTuner_XXX.local/) or [http://192.168.4.1](http://192.168.4.1), where XXX is the ID of the Torquetuner module. +![Torquetuner setup page](/images/torquetuner_setup.png "Torquetuner wifi setup page") +7. In the __Network__ section write the network name and password in the __SSID__ and __SSID Password__ fields. +8. In the __OSC send settings__ put in your computer's IP address optained in Step 3 in the __Primary IP__ field. +8. Click the green __Save__ button. +6. Click __Config__ on the top of the page to return to the orginal menu. +7. Then click the __Close and Reboot__ button at the bottom of the page. + +## Option 2: Puara Serial Manager +1. Download or clone the Puara client repository at https://github.com/Puara/puara-client. Instructions for how to clone github repositories can be found at the links below + - [Cloning a Git Repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository). +2. Open `config_template.json`. +3. Put in the network name you want the Torquetuner to connect to in the __wifiSSID__ field. +4. Put the network password in the __wifiPSK__ field. +5. Save and close `config_template.json`. +6. Run the `puara_serial_manager.py` script. +7. Connect the Torquetuner module to your PC using a USB cable. +8. The script should auto detect and configure the Torquetuner module. If the Torquetuner module is not being detected you may need to download the CP210x USB driver. A link can be found on [Esspressif's website](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/establish-serial-connection.html). \ No newline at end of file diff --git a/README.md b/README.md index dd59cf5..75939ae 100644 --- a/README.md +++ b/README.md @@ -4,64 +4,27 @@ TorqueTuner is an embedded module that allows Digital Musical Instrument ## Demonstration Video -[![IMAGE ALT TEXT](https://i.vimeocdn.com/video/898499437_640)](https://vimeo.com/404592134) +[![IMAGE ALT TEXT](https://img.youtube.com/vi/KY3mpczKI3k/0.jpg)](https://www.youtube.com/watch?v=KY3mpczKI3k) +The hardware is based on the ESP32 microcontroller and the [moteus](https://mjbots.com/) platform, to implement a force feedback rotary encoder with 3600 PPR ~= 0.1 degree resolution that can display forces up to 45 Ncm (63.7oz.in). +## Documentation: +[Build Guide](./Docs/Build_guide_v1.md) +[Torquetuner Connection Guide](./Docs/connection_guide_v1.md) -
+[Torquetuner Firmware Update Guide](./Docs/Firmware_update_instructions.md) - - -
+[Torquetuner OSC Namespace](./Docs/TorquetunerOSC.md) -The hardware is based on the ESP32 microcontroller and the [mechaduino](https://github.com/jcchurch13/Mechaduino-Hardware) platform, to implement a force feedback rotary encoder with 3600 PPR ~= 0.1 degree resolution that can display forces up to 45 Ncm (63.7oz.in). +## Project Info: +Project webpage at IDMIL: http://www.idmil.org/project/torquetuner/ +Official repository: https://github.com/IDMIL/torquetuner -## Installation +IDMIL - Input Devices and Music Interaction Laboratory - http://www-new.idmil.org/ -Clone this repository and all of its submodules - - git clone --recursive https://github.com/IDMIL/TorqueTuner +Metalab - Society for Arts and Technology - https://sat.qc.ca/fr/recherche/metalab +CIRMMT - Centre for Interdisciplinary Research in Music Media and Technology - http://www.cirmmt.org/ -## libmapper +Schulich School of Music - McGill University -on MacOs - - git clone https://github.com/libmapper/libmapper.git - cd libmapper - ./autogen.sh - make - make install - -## libmapper arduino library - -The libmapper arduino library needs to be compiled and moved to the Arduino libraries folder. See [instructions](https://github.com/mathiasbredholt/libmapper_arduino) - -## Upload firmware - -Upload mechaduino firmware -1. Open software/Mechaduino-firmware/Mechaduino/Mechaduino.ino in arduino -2. Choose board -> arduino zero -3. Upload - -Upload ESP32 firmware - -1. Install [arduino-ESP32](https://github.com/espressif/arduino-esp32/blob/master/docs/arduino-ide/boards_manager.md) using boards manager -2. Open software/TorqueTuner-ESP32/firmware/ESP32/ESP32.ino in arduino -3. Choose board -> TinyPico -4. Upload - -## Calibration -Follow [instructions](https://github.com/jcchurch13/Mechaduino-Firmware#calibration-routine) on calibrating the magnetic encoder with the known step angle given. - -## Usage -TODO: Write about how to use libmapper, supported audio environments and examples - -## Building the hardware - -## T-stick integration - -
- - -
diff --git a/images/assembled_TopPlate.jpg b/images/assembled_TopPlate.jpg new file mode 100644 index 0000000..5b0ecc4 Binary files /dev/null and b/images/assembled_TopPlate.jpg differ diff --git a/images/electronics_finished.jpg b/images/electronics_finished.jpg new file mode 100644 index 0000000..0a6d021 Binary files /dev/null and b/images/electronics_finished.jpg differ diff --git a/images/magnets.jpg b/images/magnets.jpg new file mode 100644 index 0000000..ca33359 Binary files /dev/null and b/images/magnets.jpg differ diff --git a/images/moteus_onplate.jpg b/images/moteus_onplate.jpg new file mode 100644 index 0000000..6ad135a Binary files /dev/null and b/images/moteus_onplate.jpg differ diff --git a/images/torquetuner_finished.jpg b/images/torquetuner_finished.jpg new file mode 100644 index 0000000..899929b Binary files /dev/null and b/images/torquetuner_finished.jpg differ diff --git a/images/torquetuner_overview.jpg b/images/torquetuner_overview.jpg new file mode 100644 index 0000000..e71049a Binary files /dev/null and b/images/torquetuner_overview.jpg differ diff --git a/images/torquetuner_setup.png b/images/torquetuner_setup.png new file mode 100644 index 0000000..498d388 Binary files /dev/null and b/images/torquetuner_setup.png differ diff --git a/software/.DS_Store b/software/.DS_Store new file mode 100644 index 0000000..37a814e Binary files /dev/null and b/software/.DS_Store differ diff --git a/software/CMakeLists.txt b/software/CMakeLists.txt new file mode 100644 index 0000000..aea3636 --- /dev/null +++ b/software/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.16.0) +include($ENV{IDF_PATH}/tools/cmake/project.cmake) +project(Puara module manager) diff --git a/software/LICENSE.txt b/software/LICENSE.txt new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/software/LICENSE.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/software/Mechaduino-firmware b/software/Mechaduino-firmware deleted file mode 160000 index 275b3a4..0000000 --- a/software/Mechaduino-firmware +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 275b3a4c10cb78d30d6440769a3da264db799524 diff --git a/software/README.md b/software/README.md new file mode 100644 index 0000000..264435e --- /dev/null +++ b/software/README.md @@ -0,0 +1,9 @@ +# TorqueTuner: A self contained module for designing rotaryhaptic force feedback for digital musical instruments. + +This repository is part of the TorqueTuner project, and contains firmware for the ESP32 microcontroller. + +You will need to create file `Firmware/Esp32/wifi_credentials.h` that contains the right values `"..."` for your WiFi settings: +``` +const char* SSID = "..."; +const char* PASSWORD = "..."; +``` \ No newline at end of file diff --git a/software/TorqueTuner-ESP32 b/software/TorqueTuner-ESP32 deleted file mode 160000 index 8a6820d..0000000 --- a/software/TorqueTuner-ESP32 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8a6820dd5c04d2b6bd5f1c60003325b61de3fd1d diff --git a/software/data/config.json b/software/data/config.json new file mode 100644 index 0000000..1102cce --- /dev/null +++ b/software/data/config.json @@ -0,0 +1,15 @@ +{ + "device": "TorqueTuner", + "id": 1, + "author": "Albert-Ngabo Niyonsenga", + "institution": "SAT/IDMIL (2022)", + "APpasswd": "mappings", + "wifiSSID": "tstick_network", + "wifiPSK": "mappings", + "persistentAP": 1, + "oscIP1": "192.168.4.2", + "oscPORT1": 8000, + "oscIP2": "192.168.0.100", + "oscPORT2": 8000, + "localPORT": 8000 +} diff --git a/software/data/factory.html b/software/data/factory.html new file mode 100644 index 0000000..532fb6d --- /dev/null +++ b/software/data/factory.html @@ -0,0 +1,62 @@ + + + + + + + + +

Config    Scan    Settings + +

%DEVICENAME%

+

%STATUS%

+

Settings:

+
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+
+ +
+ +

+
+ +
+ + +

+ + + + \ No newline at end of file diff --git a/software/data/index.html b/software/data/index.html new file mode 100644 index 0000000..8e54a2b --- /dev/null +++ b/software/data/index.html @@ -0,0 +1,190 @@ + + + + + + + + +

Config    Scan    Settings + +

%DMINAME%

+

%STATUS%

+

Config:

+
+ +
+
+

Network:

+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+

%DEVICENAME% password:

+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+
+ +
+

OSC send settings:

+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+
+ +
+ +

Network info:

+
+
+ + + + + + + + + + + + + + + + + + + + + +
Current stored SSID:%CURRENTSSID2%
Current IP address (STA):%CURRENTIP%
Access Point IP:%CURRENTAPIP%
Station (STA) MAC:%CURRENTSTAMAC%
Access Point MAC:%CURRENTAPMAC%
+
+
+ +

+ +

Instrument info:

+
+ + + + + + + + + + + + + + + + + +
ID (serial #):%MODULEID%
Device author:%MODULEAUTH%
Institution:%MODULEINST%
Firmware version: %MODULEVER%
+
+ +

+
+ +
+ +

+ + + + \ No newline at end of file diff --git a/software/data/reboot.html b/software/data/reboot.html new file mode 100644 index 0000000..095da8c --- /dev/null +++ b/software/data/reboot.html @@ -0,0 +1,14 @@ + + + + + + + + +

Config    Scan    Settings + +

Rebooting. Please close this window.

+ + + \ No newline at end of file diff --git a/software/data/saved.html b/software/data/saved.html new file mode 100644 index 0000000..088caef --- /dev/null +++ b/software/data/saved.html @@ -0,0 +1,14 @@ + + + + + + + + +

Config    Scan    Settings + +

Information saved successfully. Use the link above to return to the main config page.

+ + + \ No newline at end of file diff --git a/software/data/scan.html b/software/data/scan.html new file mode 100644 index 0000000..9c86e50 --- /dev/null +++ b/software/data/scan.html @@ -0,0 +1,20 @@ + + + + + + + + +

Config    Scan    Settings + +

Scanning for networks

+

To use one of the SSIDs below, copy the network name and paste it at the config page +

+ +
+ %SSIDS% +
+ + + \ No newline at end of file diff --git a/software/data/settings.html b/software/data/settings.html new file mode 100644 index 0000000..6276cd8 --- /dev/null +++ b/software/data/settings.html @@ -0,0 +1,26 @@ + + + + + + + + +

Config    Scan    Settings + +

Module custom settings

+
+
+ + %DATAFROMMODULE% + +
+ +
+
+ +
+ + + + \ No newline at end of file diff --git a/software/data/settings.json b/software/data/settings.json new file mode 100644 index 0000000..cc7cda9 --- /dev/null +++ b/software/data/settings.json @@ -0,0 +1,16 @@ +{ + "settings": [ + { + "name": "Hitchhiker", + "value": "Ford" + }, + { + "name": "answer_to_everything", + "value": 42 + }, + { + "name": "variable3", + "value": 12.345 + } + ] +} \ No newline at end of file diff --git a/software/data/style.css b/software/data/style.css new file mode 100644 index 0000000..b343f50 --- /dev/null +++ b/software/data/style.css @@ -0,0 +1,161 @@ +* { + box-sizing: border-box; +} + +html { + font-family: Helvetica; + display: inline-block; + margin: 0px auto; + text-align: center; +} + +input[type=text], select, textarea { + width: 100%; + padding: 12px; + border: 1px solid #ccc; + border-radius: 4px; + resize: vertical; +} + +input[type=password], select, textarea { + width: 100%; + padding: 12px; + border: 1px solid #ccc; + border-radius: 4px; + resize: vertical; +} + +input[type=number], select, textarea { + width: 100%; + padding: 12px; + border: 1px solid #ccc; + border-radius: 4px; + resize: vertical; +} + +input:invalid { + border: 1px dashed red; + } + +label { + padding: 12px 12px 12px 0; + display: inline-block; +} + +input[type=submit] { + background-color: #4CAF50; + color: white; + padding: 12px 20px; + border: none; + border-radius: 10px; + cursor: pointer; +} + +input[type=submit]:hover { + background-color: #45a049; +} + +.container { + max-width: 800px; + margin-left: auto; + margin-right: auto; + border-radius: 10px; + background-color: #f2f2f2; + padding: 20px; +} + +.col-25 { + float: left; + width: 25%; + margin-top: 6px; + text-align: left; +} + +.col-75 { + float: left; + width: 75%; + margin-top: 6px; + text-align: left; +} + +.scanbox { + max-width: 800px; + margin-left: auto; + margin-right: auto; + border-radius: 10px; + background-color: #f2f2f2; + padding: 20px; + width: 100%; + margin-top: 6px; + text-align: left; +} + +/* Clear floats after the columns */ + +.row:after { + content: ""; + display: table; + clear: both; +} + +button { + background-color: #4CAF50; + color: white; + padding: 12px 20px; + border: none; + border-radius: 10px; + cursor: pointer; + margin-left: auto; + margin-right: auto; +} + +button:hover { + background-color: #45a049; +} + +h1 { + color: #444444; +} + +h2 { + color: #444444; +} + +h3 { + color: #444444; + text-align: left; + margin-bottom: 1px; + margin-top: 30px; +} + +table { + width: auto; + padding-left: 50px; +} + +th, td { + border-bottom: 1px solid #ddd; + text-align: left; + padding-left: 15px; +} + +p { + font-size: 20px; + color: #444444; +} + +/* Responsive layout - when the screen is less than 600px wide, make the two columns stack on top of each other instead of next to each other */ + +@media screen and (max-width: 600px) { + .col-25, .col-75, input[type=submit] { + width: 100%; + margin-top: 0; + } + label { + padding: 6px 6px 3px 0; + display: inline-block; + } + table { + padding-left: 1px; + } +} \ No newline at end of file diff --git a/software/data/update.html b/software/data/update.html new file mode 100644 index 0000000..f832b6e --- /dev/null +++ b/software/data/update.html @@ -0,0 +1,115 @@ + + + + + + + + + + + + +

Config    Scan    Update    Settings + +

Firmware/SPIFFS update

+

Choose the apropriate .bin file and click "Update"

+ +
+ + +
+ +
+ + +
+ + + + + + + + + + \ No newline at end of file diff --git a/software/include/README b/software/include/README new file mode 100644 index 0000000..194dcd4 --- /dev/null +++ b/software/include/README @@ -0,0 +1,39 @@ + +This directory is intended for project header files. + +A header file is a file containing C declarations and macro definitions +to be shared between several project source files. You request the use of a +header file in your project source file (C, C++, etc) located in `src` folder +by including it, with the C preprocessing directive `#include'. + +```src/main.c + +#include "header.h" + +int main (void) +{ + ... +} +``` + +Including a header file produces the same results as copying the header file +into each source file that needs it. Such copying would be time-consuming +and error-prone. With a header file, the related declarations appear +in only one place. If they need to be changed, they can be changed in one +place, and programs that include the header file will automatically use the +new version when next recompiled. The header file eliminates the labor of +finding and changing all the copies as well as the risk that a failure to +find one copy will result in inconsistencies within a program. + +In C, the usual convention is to give header files names that end with `.h'. +It is most portable to use only letters, digits, dashes, and underscores in +header file names, and at most one dot. + +Read more about using header files in official GCC documentation: + +* Include Syntax +* Include Operation +* Once-Only Headers +* Computed Includes + +https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html diff --git a/software/include/filter.h b/software/include/filter.h new file mode 100644 index 0000000..49b832a --- /dev/null +++ b/software/include/filter.h @@ -0,0 +1,19 @@ +#pragma once + +class Filter +{ +public: + Filter() { + // w[0] = 0; w[1] = 0, w[2] = 0; + }; + float update(float x) { + w[0] = x - a[1] * w[1] - a[2] * w[2]; + x = b[0] * w[0] + b[1] * w[1] + b[2] * w[2]; + w[2] = w[1]; + w[1] = w[0]; + return x; + }; + float w[3] = {0, 0, 0}; + float a[3] = {1.0000, -1.3329, 0.5053}; + float b[3] = { 0.0431, 0.0862, 0.0431}; +}; diff --git a/software/include/haptics.h b/software/include/haptics.h new file mode 100644 index 0000000..1db582e --- /dev/null +++ b/software/include/haptics.h @@ -0,0 +1,283 @@ +#ifndef __HAPTICS_H__ +#define __HAPTICS_H__ + +#include +#include +#include +#include +#include +#include +#include "tf_magnet.h" +#include "tf_click.h" +#include "tf_exp_spring.h" +#include "tf_sin.h" +#include "tf_click_2.h" +#include "Arduino.h" +#include "variants.h" +#include +#include + +const int TABLE_RESOLUTION = 65535; +const int MAX_TORQUE = 180; +const int WALL_TORQUE = 180; +const float MAX_VELOCITY = 500; + +const int SERIAL_BUFSIZE = 1024; + +class Mode +{ +public: + Mode( float scale_ = MAX_TORQUE / 2, int stretch_ = 1, float min_ = 0, float max_ = 3600, float damping_ = 0.0) + : min(min_), max(max_), scale_default(scale_), stretch_default(stretch_), damping(damping_) + { + #ifdef MOTEUS + damping = 0.17; + #endif + }; + virtual void set_active(bool is_active) {} // Used for any init/de-init per-mode + virtual int16_t calc(void* ptr) = 0; + int16_t calc_index(void* ptr); + void reset(int16_t angle_); + + float scale_default, stretch_default, min, max, damping, target_velocity_default; + int offset = 0; + + bool wrap_output = false; + bool wrap_haptics = false; + char pid_mode = 't'; + int idx = 0; + int state = 0; +}; + +class Wall: public Mode +{ +public: + Wall() : Mode(MAX_TORQUE / 2) { + damping = 0.4; + max = 3000; + } + int16_t calc(void* ptr); + float stiffness = 0.1; + float threshold = 1 / stiffness; +}; + +class Click: public Mode +{ +public: + Click() : Mode(MAX_TORQUE / 3.0, 10, 0, 3600) + { + #ifdef MOTEUS + damping = 0.2; + #endif + offset = 1799; + wrap_output = true; + wrap_haptics = true; + } + int16_t calc(void* ptr); +}; + +class Magnet: public Mode +{ +public: + Magnet() : Mode() { + damping = 0.15; + } + int16_t calc(void* ptr); +}; + +class Inertia: public Mode +{ +public: + Inertia() : Mode(MAX_TORQUE) {} + int16_t calc(void* ptr); +}; + +class ExpSpring: public Mode +{ +public: + ExpSpring() : Mode(180, 1, 0, 3600, 0.1) { + stretch_default = 5; + damping = 0.25; + } + int16_t calc(void* ptr); +}; + +class LinSpring: public Mode +{ +public: + LinSpring() : Mode(MAX_TORQUE, 1, 0, 3600) { + wrap_output = true; + wrap_haptics = false; + } + int16_t calc(void* ptr); +}; + +class Free: public Mode +{ +public: + Free() : Mode(0, 1) { + target_velocity_default = 0; + } + int16_t calc(void* ptr); +}; + +class Spin: public Mode +{ +public: + Spin() : Mode(0, 1) { + pid_mode = 'v'; + wrap_output = true; + target_velocity_default = 200; + } + int16_t calc(void* ptr); +}; + +class SerialListen: public Mode +{ +public: + SerialListen(); + int16_t calc(void* ptr); + void set_active(bool is_active); + +private: + static bool active; + static int16_t torqueIn; + static int16_t angleOut; + static std::string serial_data_str_buffer; + static char serial_data[SERIAL_BUFSIZE]; + static int serial_data_length; + static std::string serial_data_str; + static std::string serial_config_str; + static inline std::string convertToString(char* a) { + std::string s(a); + return s; + } + static void serial_monitor(void *pvParameters); +}; + +class TorqueTuner +{ +public: + enum MODE { + CLICK = 0, + MAGNET = 1, + WALL = 2, + INERTIA = 3, + LINSPRING = 4, + EXPSPRING = 5, + FREE = 6, + SPIN = 7, + SERIAL_LISTEN = 8 + }; + const int trigger_interval = 50000; // 10 ms + + TorqueTuner(); + + void update(); + void update_angle(); + void update_trig(); + float calc_acceleration(float velocity_); + float filter(float x); + float gate(float val, float threshold, float floor); + int32_t getTime(); + + void set_mode(MODE mode_); + void set_mode(int mode_idx); + void print_mode(MODE mode_); + void set_defaults(Mode * mode); + void set_stretch(float stretch_); + void reset(Mode * mode_); + + MODE mode = WALL; + int16_t angle = 0; // unwrap_outputped angle representing encoder reading + int16_t angle_last = 0; + int32_t angle_out = 0; + int32_t angle_out_last = 0; + int16_t wrap_count = 0; + int16_t angle_delta = 0; + int16_t angle_unclipped = 0; + int16_t angle_discrete = 0; // angle output value syncronized via libmapper + int16_t angle_discrete_last = 0; + int16_t torque = 0; + int trigger = -1; + int num_modes = 0; + + float velocity = 0; + float velocity_out = 0; + float target_velocity = 0; // [-500;500] + float acceleration = 0; // [-100;100] + float scale = 75.0; + float stretch = 1; // Corresponds to detents in click and magnet mode. + + Click click; + Magnet magnet; + Wall wall; + LinSpring lin_spring; + ExpSpring exp_spring; + Free free; + Inertia inertia; + Spin spin; + SerialListen serial; + std::vector mode_list = {&click, &magnet, &wall, &inertia, &lin_spring, &exp_spring, &free, &spin, &serial}; + Mode * active_mode; + +private: + // Filter variables + float a[3] = {1.0000, -1.3329, 0.5053}; + float b[3] = { 0.0431, 0.0862, 0.0431}; +}; + +int zero_crossing(int in); + + +inline int mod(int in, int hi) { + const int lo = 0; + if (in >= hi) { + in -= hi; + if (in < hi) { + return in; + } + } else if (in < lo) { + in += hi; + if (in >= lo) { + return in; + } + } else { + return in; + } + if (hi == lo) { + return lo; + } + int c; + c = in % hi; + if (c < 0) { + c += hi; + } + return c; +} + +inline int fold(int in, int lo, int hi) { + int b = hi - lo; + int b2 = b + b; + int c = mod(in - lo, b2); + if (c > b) + c = b2 - c; + return c + lo; +} + +inline int clip(int in, int lo, int hi) { + if (in > hi) { + return hi; + } else if (in < lo) { + return lo; + } else { + return in; + } +} + +inline int sign(float x) { + return (x < 0) ? -1 : (x > 0); +} + + +#endif diff --git a/software/include/magnet.h b/software/include/magnet.h new file mode 100644 index 0000000..5a92dc6 --- /dev/null +++ b/software/include/magnet.h @@ -0,0 +1,362 @@ +const int tf_magnet[] = { + 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, + 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, + 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, + 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, + 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, + 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, + 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, + 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, + 29, 29, 29, 29, 29, 29, 30, 30, 30, 30, + 30, 30, 30, 31, 31, 31, 31, 31, 31, 31, + 31, 32, 32, 32, 32, 32, 32, 32, 32, 33, + 33, 33, 33, 33, 33, 33, 34, 34, 34, 34, + 34, 34, 34, 35, 35, 35, 35, 35, 35, 35, + 35, 36, 36, 36, 36, 36, 36, 36, 37, 37, + 37, 37, 37, 37, 37, 38, 38, 38, 38, 38, + 38, 38, 39, 39, 39, 39, 39, 39, 39, 40, + 40, 40, 40, 40, 40, 40, 41, 41, 41, 41, + 41, 41, 41, 42, 42, 42, 42, 42, 42, 42, + 43, 43, 43, 43, 43, 43, 43, 44, 44, 44, + 44, 44, 44, 44, 45, 45, 45, 45, 45, 45, + 46, 46, 46, 46, 46, 46, 46, 47, 47, 47, + 47, 47, 47, 47, 48, 48, 48, 48, 48, 48, + 49, 49, 49, 49, 49, 49, 49, 50, 50, 50, + 50, 50, 50, 51, 51, 51, 51, 51, 51, 52, + 52, 52, 52, 52, 52, 52, 53, 53, 53, 53, + 53, 53, 54, 54, 54, 54, 54, 54, 55, 55, + 55, 55, 55, 55, 56, 56, 56, 56, 56, 56, + 57, 57, 57, 57, 57, 57, 57, 58, 58, 58, + 58, 58, 58, 59, 59, 59, 59, 59, 59, 60, + 60, 60, 60, 60, 61, 61, 61, 61, 61, 61, + 62, 62, 62, 62, 62, 62, 63, 63, 63, 63, + 63, 63, 64, 64, 64, 64, 64, 64, 65, 65, + 65, 65, 65, 66, 66, 66, 66, 66, 66, 67, + 67, 67, 67, 67, 67, 68, 68, 68, 68, 68, + 69, 69, 69, 69, 69, 69, 70, 70, 70, 70, + 70, 71, 71, 71, 71, 71, 71, 72, 72, 72, + 72, 72, 73, 73, 73, 73, 73, 74, 74, 74, + 74, 74, 74, 75, 75, 75, 75, 75, 76, 76, + 76, 76, 76, 77, 77, 77, 77, 77, 78, 78, + 78, 78, 78, 79, 79, 79, 79, 79, 79, 80, + 80, 80, 80, 80, 81, 81, 81, 81, 81, 82, + 82, 82, 82, 82, 83, 83, 83, 83, 83, 84, + 84, 84, 84, 84, 85, 85, 85, 85, 85, 86, + 86, 86, 86, 87, 87, 87, 87, 87, 88, 88, + 88, 88, 88, 89, 89, 89, 89, 89, 90, 90, + 90, 90, 90, 91, 91, 91, 91, 92, 92, 92, + 92, 92, 93, 93, 93, 93, 93, 94, 94, 94, + 94, 95, 95, 95, 95, 95, 96, 96, 96, 96, + 97, 97, 97, 97, 97, 98, 98, 98, 98, 99, + 99, 99, 99, 99, 100, 100, 100, 100, 101, 101, + 101, 101, 101, 102, 102, 102, 102, 103, 103, 103, + 103, 104, 104, 104, 104, 104, 105, 105, 105, 105, + 106, 106, 106, 106, 107, 107, 107, 107, 108, 108, + 108, 108, 108, 109, 109, 109, 109, 110, 110, 110, + 110, 111, 111, 111, 111, 112, 112, 112, 112, 113, + 113, 113, 113, 114, 114, 114, 114, 115, 115, 115, + 115, 116, 116, 116, 116, 117, 117, 117, 117, 118, + 118, 118, 118, 119, 119, 119, 119, 120, 120, 120, + 120, 121, 121, 121, 121, 122, 122, 122, 122, 123, + 123, 123, 123, 124, 124, 124, 124, 125, 125, 125, + 126, 126, 126, 126, 127, 127, 127, 127, 128, 128, + 128, 128, 129, 129, 129, 130, 130, 130, 130, 131, + 131, 131, 131, 132, 132, 132, 133, 133, 133, 133, + 134, 134, 134, 135, 135, 135, 135, 136, 136, 136, + 136, 137, 137, 137, 138, 138, 138, 138, 139, 139, + 139, 140, 140, 140, 140, 141, 141, 141, 142, 142, + 142, 143, 143, 143, 143, 144, 144, 144, 145, 145, + 145, 145, 146, 146, 146, 147, 147, 147, 148, 148, + 148, 148, 149, 149, 149, 150, 150, 150, 151, 151, + 151, 151, 152, 152, 152, 153, 153, 153, 154, 154, + 154, 155, 155, 155, 155, 156, 156, 156, 157, 157, + 157, 158, 158, 158, 159, 159, 159, 160, 160, 160, + 161, 161, 161, 162, 162, 162, 162, 163, 163, 163, + 164, 164, 164, 165, 165, 165, 166, 166, 166, 167, + 167, 167, 168, 168, 168, 169, 169, 169, 170, 170, + 170, 171, 171, 171, 172, 172, 172, 173, 173, 174, + 174, 174, 175, 175, 175, 176, 176, 176, 177, 177, + 177, 178, 178, 178, 179, 179, 179, 180, 180, 180, + 181, 181, 182, 182, 182, 183, 183, 183, 184, 184, + 184, 185, 185, 186, 186, 186, 187, 187, 187, 188, + 188, 188, 189, 189, 190, 190, 190, 191, 191, 191, + 192, 192, 193, 193, 193, 194, 194, 194, 195, 195, + 196, 196, 196, 197, 197, 197, 198, 198, 199, 199, + 199, 200, 200, 201, 201, 201, 202, 202, 203, 203, + 203, 204, 204, 205, 205, 205, 206, 206, 207, 207, + 207, 208, 208, 209, 209, 209, 210, 210, 211, 211, + 211, 212, 212, 213, 213, 213, 214, 214, 215, 215, + 216, 216, 216, 217, 217, 218, 218, 218, 219, 219, + 220, 220, 221, 221, 221, 222, 222, 223, 223, 224, + 224, 224, 225, 225, 226, 226, 227, 227, 228, 228, + 228, 229, 229, 230, 230, 231, 231, 231, 232, 232, + 233, 233, 234, 234, 235, 235, 236, 236, 236, 237, + 237, 238, 238, 239, 239, 240, 240, 241, 241, 242, + 242, 242, 243, 243, 244, 244, 245, 245, 246, 246, + 247, 247, 248, 248, 249, 249, 250, 250, 251, 251, + 251, 252, 252, 253, 253, 254, 254, 255, 255, 256, + 256, 257, 257, 258, 258, 259, 259, 260, 260, 261, + 261, 262, 262, 263, 263, 264, 264, 265, 265, 266, + 266, 267, 267, 268, 269, 269, 270, 270, 271, 271, + 272, 272, 273, 273, 274, 274, 275, 275, 276, 276, + 277, 277, 278, 279, 279, 280, 280, 281, 281, 282, + 282, 283, 283, 284, 284, 285, 286, 286, 287, 287, + 288, 288, 289, 289, 290, 291, 291, 292, 292, 293, + 293, 294, 295, 295, 296, 296, 297, 297, 298, 299, + 299, 300, 300, 301, 301, 302, 303, 303, 304, 304, + 305, 306, 306, 307, 307, 308, 309, 309, 310, 310, + 311, 312, 312, 313, 313, 314, 315, 315, 316, 316, + 317, 318, 318, 319, 320, 320, 321, 321, 322, 323, + 323, 324, 325, 325, 326, 326, 327, 328, 328, 329, + 330, 330, 331, 332, 332, 333, 333, 334, 335, 335, + 336, 337, 337, 338, 339, 339, 340, 341, 341, 342, + 343, 343, 344, 345, 345, 346, 347, 347, 348, 349, + 349, 350, 351, 352, 352, 353, 354, 354, 355, 356, + 356, 357, 358, 358, 359, 360, 361, 361, 362, 363, + 363, 364, 365, 366, 366, 367, 368, 368, 369, 370, + 371, 371, 372, 373, 374, 374, 375, 376, 377, 377, + 378, 379, 379, 380, 381, 382, 382, 383, 384, 385, + 386, 386, 387, 388, 389, 389, 390, 391, 392, 392, + 393, 394, 395, 396, 396, 397, 398, 399, 400, 400, + 401, 402, 403, 404, 404, 405, 406, 407, 408, 408, + 409, 410, 411, 412, 412, 413, 414, 415, 416, 417, + 417, 418, 419, 420, 421, 422, 422, 423, 424, 425, + 426, 427, 428, 428, 429, 430, 431, 432, 433, 434, + 435, 435, 436, 437, 438, 439, 440, 441, 442, 442, + 443, 444, 445, 446, 447, 448, 449, 450, 451, 451, + 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, + 462, 463, 464, 464, 465, 466, 467, 468, 469, 470, + 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, + 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, + 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, + 511, 513, 514, 515, 516, 517, 518, 519, 520, 521, + 522, 523, 524, 525, 527, 528, 529, 530, 531, 532, + 533, 534, 535, 537, 538, 539, 540, 541, 542, 543, + 544, 546, 547, 548, 549, 550, 551, 553, 554, 555, + 556, 557, 558, 560, 561, 562, 563, 564, 566, 567, + 568, 569, 570, 572, 573, 574, 575, 576, 578, 579, + 580, 581, 583, 584, 585, 586, 588, 589, 590, 591, + 593, 594, 595, 596, 598, 599, 600, 602, 603, 604, + 605, 607, 608, 609, 611, 612, 613, 615, 616, 617, + 619, 620, 621, 623, 624, 625, 627, 628, 629, 631, + 632, 634, 635, 636, 638, 639, 640, 642, 643, 645, + 646, 647, 649, 650, 652, 653, 655, 656, 657, 659, + 660, 662, 663, 665, 666, 668, 669, 671, 672, 674, + 675, 677, 678, 680, 681, 683, 684, 686, 687, 689, + 690, 692, 693, 695, 696, 698, 699, 701, 703, 704, + 706, 707, 709, 710, 712, 714, 715, 717, 718, 720, + 722, 723, 725, 727, 728, 730, 731, 733, 735, 736, + 738, 740, 741, 743, 745, 747, 748, 750, 752, 753, + 755, 757, 758, 760, 762, 764, 765, 767, 769, 771, + 772, 774, 776, 778, 780, 781, 783, 785, 787, 789, + 790, 792, 794, 796, 798, 800, 801, 803, 805, 807, + 809, 811, 813, 815, 816, 818, 820, 822, 824, 826, + 828, 830, 832, 834, 836, 838, 840, 842, 844, 846, + 848, 850, 852, 854, 856, 858, 860, 862, 864, 866, + 868, 870, 872, 874, 876, 878, 880, 882, 885, 887, + 889, 891, 893, 895, 897, 899, 902, 904, 906, 908, + 910, 913, 915, 917, 919, 921, 924, 926, 928, 930, + 933, 935, 937, 939, 942, 944, 946, 949, 951, 953, + 956, 958, 960, 963, 965, 967, 970, 972, 974, 977, + 979, 982, 984, 987, 989, 991, 994, 996, 999, 1001, + 1004, 1006, 1009, 1011, 1014, 1016, 1019, 1021, 1024, 0, + 0, -1024, -1021, -1019, -1016, -1014, -1011, -1009, -1006, -1004, + -1001, -999, -996, -994, -991, -989, -987, -984, -982, -979, + -977, -974, -972, -970, -967, -965, -963, -960, -958, -956, + -953, -951, -949, -946, -944, -942, -939, -937, -935, -933, + -930, -928, -926, -924, -921, -919, -917, -915, -913, -910, + -908, -906, -904, -902, -899, -897, -895, -893, -891, -889, + -887, -885, -882, -880, -878, -876, -874, -872, -870, -868, + -866, -864, -862, -860, -858, -856, -854, -852, -850, -848, + -846, -844, -842, -840, -838, -836, -834, -832, -830, -828, + -826, -824, -822, -820, -818, -816, -815, -813, -811, -809, + -807, -805, -803, -801, -800, -798, -796, -794, -792, -790, + -789, -787, -785, -783, -781, -780, -778, -776, -774, -772, + -771, -769, -767, -765, -764, -762, -760, -758, -757, -755, + -753, -752, -750, -748, -747, -745, -743, -741, -740, -738, + -736, -735, -733, -731, -730, -728, -727, -725, -723, -722, + -720, -718, -717, -715, -714, -712, -710, -709, -707, -706, + -704, -703, -701, -699, -698, -696, -695, -693, -692, -690, + -689, -687, -686, -684, -683, -681, -680, -678, -677, -675, + -674, -672, -671, -669, -668, -666, -665, -663, -662, -660, + -659, -657, -656, -655, -653, -652, -650, -649, -647, -646, + -645, -643, -642, -640, -639, -638, -636, -635, -634, -632, + -631, -629, -628, -627, -625, -624, -623, -621, -620, -619, + -617, -616, -615, -613, -612, -611, -609, -608, -607, -605, + -604, -603, -602, -600, -599, -598, -596, -595, -594, -593, + -591, -590, -589, -588, -586, -585, -584, -583, -581, -580, + -579, -578, -576, -575, -574, -573, -572, -570, -569, -568, + -567, -566, -564, -563, -562, -561, -560, -558, -557, -556, + -555, -554, -553, -551, -550, -549, -548, -547, -546, -544, + -543, -542, -541, -540, -539, -538, -537, -535, -534, -533, + -532, -531, -530, -529, -528, -527, -525, -524, -523, -522, + -521, -520, -519, -518, -517, -516, -515, -514, -513, -511, + -510, -509, -508, -507, -506, -505, -504, -503, -502, -501, + -500, -499, -498, -497, -496, -495, -494, -493, -492, -491, + -490, -489, -488, -487, -486, -485, -484, -483, -482, -481, + -480, -479, -478, -477, -476, -475, -474, -473, -472, -471, + -470, -469, -468, -467, -466, -465, -464, -464, -463, -462, + -461, -460, -459, -458, -457, -456, -455, -454, -453, -452, + -451, -451, -450, -449, -448, -447, -446, -445, -444, -443, + -442, -442, -441, -440, -439, -438, -437, -436, -435, -435, + -434, -433, -432, -431, -430, -429, -428, -428, -427, -426, + -425, -424, -423, -422, -422, -421, -420, -419, -418, -417, + -417, -416, -415, -414, -413, -412, -412, -411, -410, -409, + -408, -408, -407, -406, -405, -404, -404, -403, -402, -401, + -400, -400, -399, -398, -397, -396, -396, -395, -394, -393, + -392, -392, -391, -390, -389, -389, -388, -387, -386, -386, + -385, -384, -383, -382, -382, -381, -380, -379, -379, -378, + -377, -377, -376, -375, -374, -374, -373, -372, -371, -371, + -370, -369, -368, -368, -367, -366, -366, -365, -364, -363, + -363, -362, -361, -361, -360, -359, -358, -358, -357, -356, + -356, -355, -354, -354, -353, -352, -352, -351, -350, -349, + -349, -348, -347, -347, -346, -345, -345, -344, -343, -343, + -342, -341, -341, -340, -339, -339, -338, -337, -337, -336, + -335, -335, -334, -333, -333, -332, -332, -331, -330, -330, + -329, -328, -328, -327, -326, -326, -325, -325, -324, -323, + -323, -322, -321, -321, -320, -320, -319, -318, -318, -317, + -316, -316, -315, -315, -314, -313, -313, -312, -312, -311, + -310, -310, -309, -309, -308, -307, -307, -306, -306, -305, + -304, -304, -303, -303, -302, -301, -301, -300, -300, -299, + -299, -298, -297, -297, -296, -296, -295, -295, -294, -293, + -293, -292, -292, -291, -291, -290, -289, -289, -288, -288, + -287, -287, -286, -286, -285, -284, -284, -283, -283, -282, + -282, -281, -281, -280, -280, -279, -279, -278, -277, -277, + -276, -276, -275, -275, -274, -274, -273, -273, -272, -272, + -271, -271, -270, -270, -269, -269, -268, -267, -267, -266, + -266, -265, -265, -264, -264, -263, -263, -262, -262, -261, + -261, -260, -260, -259, -259, -258, -258, -257, -257, -256, + -256, -255, -255, -254, -254, -253, -253, -252, -252, -251, + -251, -251, -250, -250, -249, -249, -248, -248, -247, -247, + -246, -246, -245, -245, -244, -244, -243, -243, -242, -242, + -242, -241, -241, -240, -240, -239, -239, -238, -238, -237, + -237, -236, -236, -236, -235, -235, -234, -234, -233, -233, + -232, -232, -231, -231, -231, -230, -230, -229, -229, -228, + -228, -228, -227, -227, -226, -226, -225, -225, -224, -224, + -224, -223, -223, -222, -222, -221, -221, -221, -220, -220, + -219, -219, -218, -218, -218, -217, -217, -216, -216, -216, + -215, -215, -214, -214, -213, -213, -213, -212, -212, -211, + -211, -211, -210, -210, -209, -209, -209, -208, -208, -207, + -207, -207, -206, -206, -205, -205, -205, -204, -204, -203, + -203, -203, -202, -202, -201, -201, -201, -200, -200, -199, + -199, -199, -198, -198, -197, -197, -197, -196, -196, -196, + -195, -195, -194, -194, -194, -193, -193, -193, -192, -192, + -191, -191, -191, -190, -190, -190, -189, -189, -188, -188, + -188, -187, -187, -187, -186, -186, -186, -185, -185, -184, + -184, -184, -183, -183, -183, -182, -182, -182, -181, -181, + -180, -180, -180, -179, -179, -179, -178, -178, -178, -177, + -177, -177, -176, -176, -176, -175, -175, -175, -174, -174, + -174, -173, -173, -172, -172, -172, -171, -171, -171, -170, + -170, -170, -169, -169, -169, -168, -168, -168, -167, -167, + -167, -166, -166, -166, -165, -165, -165, -164, -164, -164, + -163, -163, -163, -162, -162, -162, -162, -161, -161, -161, + -160, -160, -160, -159, -159, -159, -158, -158, -158, -157, + -157, -157, -156, -156, -156, -155, -155, -155, -155, -154, + -154, -154, -153, -153, -153, -152, -152, -152, -151, -151, + -151, -151, -150, -150, -150, -149, -149, -149, -148, -148, + -148, -148, -147, -147, -147, -146, -146, -146, -145, -145, + -145, -145, -144, -144, -144, -143, -143, -143, -143, -142, + -142, -142, -141, -141, -141, -140, -140, -140, -140, -139, + -139, -139, -138, -138, -138, -138, -137, -137, -137, -136, + -136, -136, -136, -135, -135, -135, -135, -134, -134, -134, + -133, -133, -133, -133, -132, -132, -132, -131, -131, -131, + -131, -130, -130, -130, -130, -129, -129, -129, -128, -128, + -128, -128, -127, -127, -127, -127, -126, -126, -126, -126, + -125, -125, -125, -124, -124, -124, -124, -123, -123, -123, + -123, -122, -122, -122, -122, -121, -121, -121, -121, -120, + -120, -120, -120, -119, -119, -119, -119, -118, -118, -118, + -118, -117, -117, -117, -117, -116, -116, -116, -116, -115, + -115, -115, -115, -114, -114, -114, -114, -113, -113, -113, + -113, -112, -112, -112, -112, -111, -111, -111, -111, -110, + -110, -110, -110, -109, -109, -109, -109, -108, -108, -108, + -108, -108, -107, -107, -107, -107, -106, -106, -106, -106, + -105, -105, -105, -105, -104, -104, -104, -104, -104, -103, + -103, -103, -103, -102, -102, -102, -102, -101, -101, -101, + -101, -101, -100, -100, -100, -100, -99, -99, -99, -99, + -99, -98, -98, -98, -98, -97, -97, -97, -97, -97, + -96, -96, -96, -96, -95, -95, -95, -95, -95, -94, + -94, -94, -94, -93, -93, -93, -93, -93, -92, -92, + -92, -92, -92, -91, -91, -91, -91, -90, -90, -90, + -90, -90, -89, -89, -89, -89, -89, -88, -88, -88, + -88, -88, -87, -87, -87, -87, -87, -86, -86, -86, + -86, -85, -85, -85, -85, -85, -84, -84, -84, -84, + -84, -83, -83, -83, -83, -83, -82, -82, -82, -82, + -82, -81, -81, -81, -81, -81, -80, -80, -80, -80, + -80, -79, -79, -79, -79, -79, -79, -78, -78, -78, + -78, -78, -77, -77, -77, -77, -77, -76, -76, -76, + -76, -76, -75, -75, -75, -75, -75, -74, -74, -74, + -74, -74, -74, -73, -73, -73, -73, -73, -72, -72, + -72, -72, -72, -71, -71, -71, -71, -71, -71, -70, + -70, -70, -70, -70, -69, -69, -69, -69, -69, -69, + -68, -68, -68, -68, -68, -67, -67, -67, -67, -67, + -67, -66, -66, -66, -66, -66, -66, -65, -65, -65, + -65, -65, -64, -64, -64, -64, -64, -64, -63, -63, + -63, -63, -63, -63, -62, -62, -62, -62, -62, -62, + -61, -61, -61, -61, -61, -61, -60, -60, -60, -60, + -60, -59, -59, -59, -59, -59, -59, -58, -58, -58, + -58, -58, -58, -57, -57, -57, -57, -57, -57, -57, + -56, -56, -56, -56, -56, -56, -55, -55, -55, -55, + -55, -55, -54, -54, -54, -54, -54, -54, -53, -53, + -53, -53, -53, -53, -52, -52, -52, -52, -52, -52, + -52, -51, -51, -51, -51, -51, -51, -50, -50, -50, + -50, -50, -50, -49, -49, -49, -49, -49, -49, -49, + -48, -48, -48, -48, -48, -48, -47, -47, -47, -47, + -47, -47, -47, -46, -46, -46, -46, -46, -46, -46, + -45, -45, -45, -45, -45, -45, -44, -44, -44, -44, + -44, -44, -44, -43, -43, -43, -43, -43, -43, -43, + -42, -42, -42, -42, -42, -42, -42, -41, -41, -41, + -41, -41, -41, -41, -40, -40, -40, -40, -40, -40, + -40, -39, -39, -39, -39, -39, -39, -39, -38, -38, + -38, -38, -38, -38, -38, -37, -37, -37, -37, -37, + -37, -37, -36, -36, -36, -36, -36, -36, -36, -35, + -35, -35, -35, -35, -35, -35, -35, -34, -34, -34, + -34, -34, -34, -34, -33, -33, -33, -33, -33, -33, + -33, -32, -32, -32, -32, -32, -32, -32, -32, -31, + -31, -31, -31, -31, -31, -31, -31, -30, -30, -30, + -30, -30, -30, -30, -29, -29, -29, -29, -29, -29, + -29, -29, -28, -28, -28, -28, -28, -28, -28, -28, + -27, -27, -27, -27, -27, -27, -27, -27, -26, -26, + -26, -26, -26, -26, -26, -26, -25, -25, -25, -25, + -25, -25, -25, -25, -24, -24, -24, -24, -24, -24, + -24, -24, -23, -23, -23, -23, -23, -23, -23, -23, + -22, -22, -22, -22, -22, -22, -22, -22, -21, -21, + -21, -21, -21, -21, -21, -21, -21, -20, -20, -20, + -20, -20, -20, -20, -20, -19, -19, -19, -19, -19, + -19, -19, -19, -19, -18, -18, -18, -18, -18, -18, + -18, -18, -17, -17, -17, -17, -17, -17, -17, -17, + -17, -16, -16, -16, -16, -16, -16, -16, -16, -16, + -15, -15, -15, -15, -15, -15, -15, -15, -15, -14, + -14, -14, -14, -14, -14, -14, -14, -14, -13, -13, + -13, -13, -13, -13, -13, -13, -13, -12, -12, -12, + -12, -12, -12, -12, -12, -12, -11, -11, -11, -11, + -11, -11, -11, -11, -11, -10, -10, -10, -10, -10, + -10, -10, -10, -10, -10, -9, -9, -9, -9, -9, + -9, -9, -9, -9, -8, -8, -8, -8, -8, -8, + -8, -8, -8, -8, -7, -7, -7, -7, -7, -7, + -7, -7, -7, -7, -6, -6, -6, -6, -6, -6, + -6, -6, -6, -5, -5, -5, -5, -5, -5, -5, + -5, -5, -5, -4, -4, -4, -4, -4, -4, -4, + -4, -4, -4, -3, -3, -3, -3, -3, -3, -3, + -3, -3, -3, -3, -2, -2, -2, -2, -2, -2, + -2, -2, -2, -2, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, +}; diff --git a/software/include/tf_click.h b/software/include/tf_click.h new file mode 100644 index 0000000..cfef908 --- /dev/null +++ b/software/include/tf_click.h @@ -0,0 +1,362 @@ +const int tf_click[] = { + 0, -45, -90, -136, -181, -226, -271, -316, -361, -407, + -452, -497, -542, -587, -633, -678, -723, -768, -813, -858, + -904, -949, -994, -1039, -1084, -1129, -1175, -1220, -1265, -1310, + -1355, -1400, -1446, -1491, -1536, -1581, -1626, -1671, -1717, -1762, + -1807, -1852, -1897, -1942, -1987, -2033, -2078, -2123, -2168, -2213, + -2258, -2303, -2349, -2394, -2439, -2484, -2529, -2574, -2619, -2664, + -2709, -2755, -2800, -2845, -2890, -2935, -2980, -3025, -3070, -3115, + -3161, -3206, -3251, -3296, -3341, -3386, -3431, -3476, -3521, -3566, + -3611, -3656, -3701, -3746, -3792, -3837, -3882, -3927, -3972, -4017, + -4062, -4107, -4152, -4197, -4242, -4287, -4332, -4377, -4422, -4467, + -4512, -4557, -4602, -4647, -4692, -4737, -4782, -4827, -4872, -4917, + -4962, -5007, -5052, -5097, -5142, -5187, -5231, -5276, -5321, -5366, + -5411, -5456, -5501, -5546, -5591, -5636, -5681, -5726, -5770, -5815, + -5860, -5905, -5950, -5995, -6040, -6085, -6129, -6174, -6219, -6264, + -6309, -6354, -6398, -6443, -6488, -6533, -6578, -6623, -6667, -6712, + -6757, -6802, -6846, -6891, -6936, -6981, -7025, -7070, -7115, -7160, + -7204, -7249, -7294, -7339, -7383, -7428, -7473, -7517, -7562, -7607, + -7651, -7696, -7741, -7785, -7830, -7875, -7919, -7964, -8009, -8053, + -8098, -8142, -8187, -8232, -8276, -8321, -8365, -8410, -8454, -8499, + -8544, -8588, -8633, -8677, -8722, -8766, -8811, -8855, -8900, -8944, + -8989, -9033, -9078, -9122, -9167, -9211, -9255, -9300, -9344, -9389, + -9433, -9478, -9522, -9566, -9611, -9655, -9699, -9744, -9788, -9832, + -9877, -9921, -9965, -10010, -10054, -10098, -10143, -10187, -10231, -10275, + -10320, -10364, -10408, -10452, -10497, -10541, -10585, -10629, -10674, -10718, + -10762, -10806, -10850, -10894, -10938, -10983, -11027, -11071, -11115, -11159, + -11203, -11247, -11291, -11335, -11379, -11424, -11468, -11512, -11556, -11600, + -11644, -11688, -11732, -11776, -11820, -11864, -11907, -11951, -11995, -12039, + -12083, -12127, -12171, -12215, -12259, -12303, -12346, -12390, -12434, -12478, + -12522, -12566, -12609, -12653, -12697, -12741, -12785, -12828, -12872, -12916, + -12959, -13003, -13047, -13091, -13134, -13178, -13222, -13265, -13309, -13353, + -13396, -13440, -13483, -13527, -13571, -13614, -13658, -13701, -13745, -13788, + -13832, -13875, -13919, -13962, -14006, -14049, -14093, -14136, -14180, -14223, + -14266, -14310, -14353, -14397, -14440, -14483, -14527, -14570, -14613, -14657, + -14700, -14743, -14786, -14830, -14873, -14916, -14959, -15003, -15046, -15089, + -15132, -15175, -15219, -15262, -15305, -15348, -15391, -15434, -15477, -15520, + -15563, -15606, -15649, -15693, -15736, -15779, -15822, -15865, -15907, -15950, + -15993, -16036, -16079, -16122, -16165, -16208, -16251, -16294, -16337, -16379, + -16422, -16465, -16508, -16551, -16593, -16636, -16679, -16722, -16764, -16807, + -16850, -16892, -16935, -16978, -17020, -17063, -17106, -17148, -17191, -17233, + -17276, -17318, -17361, -17404, -17446, -17489, -17531, -17573, -17616, -17658, + -17701, -17743, -17786, -17828, -17870, -17913, -17955, -17997, -18040, -18082, + -18124, -18167, -18209, -18251, -18293, -18336, -18378, -18420, -18462, -18504, + -18547, -18589, -18631, -18673, -18715, -18757, -18799, -18841, -18883, -18925, + -18967, -19009, -19051, -19093, -19135, -19177, -19219, -19261, -19303, -19345, + -19387, -19428, -19470, -19512, -19554, -19596, -19637, -19679, -19721, -19763, + -19804, -19846, -19888, -19929, -19971, -20013, -20054, -20096, -20138, -20179, + -20221, -20262, -20304, -20345, -20387, -20428, -20470, -20511, -20553, -20594, + -20635, -20677, -20718, -20760, -20801, -20842, -20883, -20925, -20966, -21007, + -21049, -21090, -21131, -21172, -21213, -21255, -21296, -21337, -21378, -21419, + -21460, -21501, -21542, -21583, -21624, -21665, -21706, -21747, -21788, -21829, + -21870, -21911, -21952, -21993, -22034, -22074, -22115, -22156, -22197, -22238, + -22278, -22319, -22360, -22400, -22441, -22482, -22522, -22563, -22604, -22644, + -22685, -22725, -22766, -22806, -22847, -22887, -22928, -22968, -23009, -23049, + -23090, -23130, -23170, -23211, -23251, -23291, -23332, -23372, -23412, -23452, + -23493, -23533, -23573, -23613, -23653, -23694, -23734, -23774, -23814, -23854, + -23894, -23934, -23974, -24014, -24054, -24094, -24134, -24174, -24214, -24253, + -24293, -24333, -24373, -24413, -24453, -24492, -24532, -24572, -24612, -24651, + -24691, -24731, -24770, -24810, -24849, -24889, -24929, -24968, -25008, -25047, + -25087, -25126, -25165, -25205, -25244, -25284, -25323, -25362, -25402, -25441, + -25480, -25520, -25559, -25598, -25637, -25676, -25716, -25755, -25794, -25833, + -25872, -25911, -25950, -25989, -26028, -26067, -26106, -26145, -26184, -26223, + -26262, -26301, -26340, -26379, -26417, -26456, -26495, -26534, -26572, -26611, + -26650, -26688, -26727, -26766, -26804, -26843, -26882, -26920, -26959, -26997, + -27036, -27074, -27113, -27151, -27189, -27228, -27266, -27304, -27343, -27381, + -27419, -27458, -27496, -27534, -27572, -27610, -27649, -27687, -27725, -27763, + -27801, -27839, -27877, -27915, -27953, -27991, -28029, -28067, -28105, -28143, + -28180, -28218, -28256, -28294, -28332, -28369, -28407, -28445, -28483, -28520, + -28558, -28595, -28633, -28671, -28708, -28746, -28783, -28821, -28858, -28896, + -28933, -28970, -29008, -29045, -29083, -29120, -29157, -29194, -29232, -29269, + -29306, -29343, -29380, -29417, -29455, -29492, -29529, -29566, -29603, -29640, + -29677, -29714, -29751, -29788, -29824, -29861, -29898, -29935, -29972, -30008, + -30045, -30082, -30119, -30155, -30192, -30229, -30265, -30302, -30338, -30375, + -30411, -30448, -30484, -30521, -30557, -30594, -30630, -30666, -30703, -30739, + -30775, -30812, -30848, -30884, -30920, -30956, -30992, -31029, -31065, -31101, + -31137, -31173, -31209, -31245, -31281, -31317, -31353, -31388, -31424, -31460, + -31496, -31532, -31567, -31603, -31639, -31675, -31710, -31746, -31781, -31817, + -31853, -31888, -31924, -31959, -31995, -32030, -32066, -32101, -32136, -32172, + -32207, -32242, -32278, -32313, -32348, -32383, -32418, -32454, -32489, -32524, + -32559, -32594, -32629, -32664, -32699, -32734, -32769, -32804, -32838, -32873, + -32908, -32943, -32978, -33012, -33047, -33082, -33117, -33151, -33186, -33220, + -33255, -33290, -33324, -33359, -33393, -33427, -33462, -33496, -33531, -33565, + -33599, -33634, -33668, -33702, -33736, -33771, -33805, -33839, -33873, -33907, + -33941, -33975, -34009, -34043, -34077, -34111, -34145, -34179, -34213, -34246, + -34280, -34314, -34348, -34381, -34415, -34449, -34482, -34516, -34550, -34583, + -34617, -34650, -34684, -34717, -34751, -34784, -34817, -34851, -34884, -34917, + -34951, -34984, -35017, -35050, -35084, -35117, -35150, -35183, -35216, -35249, + -35282, -35315, -35348, -35381, -35414, -35447, -35479, -35512, -35545, -35578, + -35610, -35643, -35676, -35709, -35741, -35774, -35806, -35839, -35871, -35904, + -35936, -35969, -36001, -36034, -36066, -36098, -36131, -36163, -36195, -36227, + -36259, -36292, -36324, -36356, -36388, -36420, -36452, -36484, -36516, -36548, + -36580, -36612, -36643, -36675, -36707, -36739, -36771, -36802, -36834, -36866, + -36897, -36929, -36960, -36992, -37024, -37055, -37086, -37118, -37149, -37181, + -37212, -37243, -37275, -37306, -37337, -37368, -37400, -37431, -37462, -37493, + -37524, -37555, -37586, -37617, -37648, -37679, -37710, -37741, -37771, -37802, + -37833, -37864, -37894, -37925, -37956, -37986, -38017, -38048, -38078, -38109, + -38139, -38170, -38200, -38230, -38261, -38291, -38321, -38352, -38382, -38412, + -38442, -38473, -38503, -38533, -38563, -38593, -38623, -38653, -38683, -38713, + -38743, -38773, -38802, -38832, -38862, -38892, -38921, -38951, -38981, -39010, + -39040, -39070, -39099, -39129, -39158, -39188, -39217, -39246, -39276, -39305, + -39334, -39364, -39393, -39422, -39451, -39480, -39510, -39539, -39568, -39597, + -39626, -39655, -39684, -39713, -39741, -39770, -39799, -39828, -39857, -39885, + -39914, -39943, -39971, -40000, -40029, -40057, -40086, -40114, -40143, -40171, + -40199, -40228, -40256, -40284, -40313, -40341, -40369, -40397, -40426, -40454, + -40482, -40510, -40538, -40566, -40594, -40622, -40650, -40677, -40705, -40733, + -40761, -40789, -40816, -40844, -40872, -40899, -40927, -40954, -40982, -41010, + -41037, -41064, -41092, -41119, -41147, -41174, -41201, -41228, -41256, -41283, + -41310, -41337, -41364, -41391, -41418, -41445, -41472, -41499, -41526, -41553, + -41580, -41607, -41633, -41660, -41687, -41713, -41740, -41767, -41793, -41820, + -41846, -41873, -41899, -41926, -41952, -41978, -42005, -42031, -42057, -42084, + -42110, -42136, -42162, -42188, -42214, -42240, -42266, -42292, -42318, -42344, + -42370, -42396, -42422, -42447, -42473, -42499, -42525, -42550, -42576, -42601, + -42627, -42653, -42678, -42703, -42729, -42754, -42780, -42805, -42830, -42856, + -42881, -42906, -42931, -42956, -42981, -43006, -43031, -43056, -43081, -43106, + -43131, -43156, -43181, -43206, -43231, -43255, -43280, -43305, -43329, -43354, + -43378, -43403, -43427, -43452, -43476, -43501, -43525, -43550, -43574, -43598, + -43622, -43647, -43671, -43695, -43719, -43743, -43767, -43791, -43815, -43839, + -43863, -43887, -43911, -43934, -43958, -43982, -44006, -44029, -44053, -44077, + -44100, -44124, -44147, -44171, -44194, -44217, -44241, -44264, -44288, -44311, + -44334, -44357, -44380, -44404, -44427, -44450, -44473, -44496, -44519, -44542, + -44565, -44587, -44610, -44633, -44656, -44678, -44701, -44724, -44746, -44769, + -44792, -44814, -44837, -44859, -44881, -44904, -44926, -44949, -44971, -44993, + -45015, -45037, -45060, -45082, -45104, -45126, -45148, -45170, -45192, -45214, + -45236, -45257, -45279, -45301, -45323, -45344, -45366, -45388, -45409, -45431, + -45452, -45474, -45495, -45517, -45538, -45559, -45581, -45602, -45623, -45645, + -45666, -45687, -45708, -45729, -45750, -45771, -45792, -45813, -45834, -45855, + -45876, -45896, -45917, -45938, -45959, -45979, -46000, -46020, -46041, -46061, + -46082, -46102, -46123, -46143, -46164, -46184, -46204, -46224, -46245, -46265, + -46285, -46305, -46325, -46345, -46365, -46385, -46405, -46425, -46445, -46464, + -46484, -46504, -46524, -46543, -46563, -46583, -46602, -46622, -46641, -46661, + -46680, -46699, -46719, -46738, -46757, -46777, -46796, -46815, -46834, -46853, + -46872, -46891, -46910, -46929, -46948, -46967, -46986, -47005, -47023, -47042, + -47061, -47080, -47098, -47117, -47135, -47154, -47172, -47191, -47209, -47228, + -47246, -47264, -47283, -47301, -47319, -47337, -47355, -47373, -47391, -47410, + -47428, -47445, -47463, -47481, -47499, -47517, -47535, -47552, -47570, -47588, + -47605, -47623, -47641, -47658, -47676, -47693, -47710, -47728, -47745, -47762, + -47780, -47797, -47814, -47831, -47848, -47865, -47882, -47899, -47916, -47933, + -47950, -47967, -47984, -48001, -48017, -48034, -48051, -48068, -48084, -48101, + -48117, -48134, -48150, -48167, -48183, -48199, -48216, -48232, -48248, -48264, + -48281, -48297, -48313, -48329, -48345, -48361, -48377, -48393, -48409, -48424, + -48440, -48456, -48472, -48487, -48503, -48519, -48534, -48550, -48565, -48581, + -48596, -48612, -48627, -48642, -48657, -48673, -48688, -48703, -48718, -48733, + -48748, -48763, -48778, -48793, -48808, -48823, -48838, -48853, -48867, -48882, + -48897, -48912, -48926, -48941, -48955, -48970, -48984, -48999, -49013, -49027, + -49042, -49056, -49070, -49084, -49099, -49113, -49127, -49141, -49155, -49169, + -49183, -49197, -49211, -49224, -49238, -49252, -49266, -49279, -49293, -49307, + -49320, -49334, -49347, -49361, -49374, -49387, -49401, -49414, -49427, -49440, + -49454, -49467, -49480, -49493, -49506, -49519, -49532, -49545, -49558, -49571, + -49583, -49596, -49609, -49622, -49634, -49647, -49660, -49672, -49685, -49697, + -49710, -49722, -49734, -49747, -49759, -49771, -49783, -49795, -49808, -49820, + -49832, -49844, -49856, -49868, -49880, -49891, -49903, -49915, -49927, -49939, + -49950, -49962, -49973, -49985, -49997, -50008, -50019, -50031, -50042, -50054, + -50065, -50076, -50087, -50099, -50110, -50121, -50132, -50143, -50154, -50165, + -50176, -50187, -50197, -50208, -50219, -50230, -50240, -50251, -50262, -50272, + -50283, -50293, -50304, -50314, -50324, -50335, -50345, -50355, -50366, -50376, + -50386, -50396, -50406, -50416, -50426, -50436, -50446, -50456, -50466, -50476, + -50485, -50495, -50505, -50514, -50524, -50534, -50543, -50553, -50562, -50571, + -50581, -50590, -50599, -50609, -50618, -50627, -50636, -50645, -50654, -50663, + -50672, -50681, -50690, -50699, -50708, -50717, -50726, -50734, -50743, -50752, + -50760, -50769, -50777, -50786, -50794, -50803, -50811, -50819, -50828, -50836, + -50844, -50852, -50861, -50869, -50877, -50885, -50893, -50901, -50909, -50916, + -50924, -50932, -50940, -50948, -50955, -50963, -50970, -50978, -50986, -50993, + -51000, -51008, -51015, -51023, -51030, -51037, -51044, -51051, -51059, -51066, + -51073, -51080, -51087, -51094, -51101, -51107, -51114, -51121, -51128, -51135, + -51141, -51148, -51154, -51161, -51167, -51174, -51180, -51187, -51193, -51199, + -51206, -51212, -51218, -51224, -51230, -51236, -51243, -51249, -51255, -51260, + -51266, -51272, -51278, -51284, -51289, -51295, -51301, -51306, -51312, -51318, + -51323, -51329, -51334, -51339, -51345, -51350, -51355, -51360, -51366, -51371, + -51376, -51381, -51386, -51391, -51396, -51401, -51406, -51411, -51415, -51420, + -51425, -51429, -51434, -51439, -51443, -51448, -51452, -51457, -51461, -51465, + -51470, -51474, -51478, -51483, -51487, -51491, -51495, -51499, -51503, -51507, + -51511, -51515, -51519, -51522, -51526, -51530, -51534, -51537, -51541, -51544, + -51548, -51551, -51555, -51558, -51562, -51565, -51568, -51572, -51575, -51578, + -51581, -51584, -51587, -51590, -51593, -51596, -51599, -51602, -51605, -51608, + -51611, -51613, -51616, -51619, -51621, -51624, -51626, -51629, -51631, -51634, + -51636, -51638, -51641, -51643, -51645, -51647, -51649, -51651, -51653, -51655, + -51657, -51659, -51661, -51663, -51665, -51667, -51668, -51670, -51672, -51673, + -51675, -51676, -51678, -51679, -51681, -51682, -51683, -51685, -51686, -51687, + -51688, -51690, -51691, -51692, -51693, -51694, -51695, -51696, -51696, -51697, + -51698, -51699, -51700, -51700, -51701, -51701, -51702, -51702, -51703, -51703, + -51921, -51403, -52415, -50646, -53540, -48985, -56088, -44652, -65529, -34, + 65535, 44650, 56089, 48984, 53540, 50646, 52416, 51403, 51921, 51703, + 51703, 51702, 51702, 51701, 51701, 51700, 51700, 51699, 51698, 51697, + 51696, 51696, 51695, 51694, 51693, 51692, 51691, 51690, 51688, 51687, + 51686, 51685, 51683, 51682, 51681, 51679, 51678, 51676, 51675, 51673, + 51672, 51670, 51668, 51667, 51665, 51663, 51661, 51659, 51657, 51655, + 51653, 51651, 51649, 51647, 51645, 51643, 51641, 51638, 51636, 51634, + 51631, 51629, 51626, 51624, 51621, 51619, 51616, 51613, 51611, 51608, + 51605, 51602, 51599, 51596, 51593, 51590, 51587, 51584, 51581, 51578, + 51575, 51572, 51568, 51565, 51562, 51558, 51555, 51551, 51548, 51544, + 51541, 51537, 51534, 51530, 51526, 51522, 51519, 51515, 51511, 51507, + 51503, 51499, 51495, 51491, 51487, 51482, 51478, 51474, 51470, 51465, + 51461, 51457, 51452, 51448, 51443, 51439, 51434, 51429, 51425, 51420, + 51415, 51411, 51406, 51401, 51396, 51391, 51386, 51381, 51376, 51371, + 51366, 51360, 51355, 51350, 51345, 51339, 51334, 51329, 51323, 51318, + 51312, 51306, 51301, 51295, 51289, 51284, 51278, 51272, 51266, 51260, + 51255, 51249, 51243, 51236, 51230, 51224, 51218, 51212, 51206, 51199, + 51193, 51187, 51180, 51174, 51167, 51161, 51154, 51148, 51141, 51134, + 51128, 51121, 51114, 51107, 51101, 51094, 51087, 51080, 51073, 51066, + 51059, 51051, 51044, 51037, 51030, 51023, 51015, 51008, 51000, 50993, + 50986, 50978, 50970, 50963, 50955, 50948, 50940, 50932, 50924, 50916, + 50909, 50901, 50893, 50885, 50877, 50869, 50860, 50852, 50844, 50836, + 50828, 50819, 50811, 50803, 50794, 50786, 50777, 50769, 50760, 50752, + 50743, 50734, 50726, 50717, 50708, 50699, 50690, 50681, 50672, 50663, + 50654, 50645, 50636, 50627, 50618, 50609, 50599, 50590, 50581, 50571, + 50562, 50553, 50543, 50533, 50524, 50514, 50505, 50495, 50485, 50475, + 50466, 50456, 50446, 50436, 50426, 50416, 50406, 50396, 50386, 50376, + 50366, 50355, 50345, 50335, 50324, 50314, 50304, 50293, 50283, 50272, + 50262, 50251, 50240, 50230, 50219, 50208, 50197, 50187, 50176, 50165, + 50154, 50143, 50132, 50121, 50110, 50099, 50087, 50076, 50065, 50054, + 50042, 50031, 50019, 50008, 49997, 49985, 49973, 49962, 49950, 49939, + 49927, 49915, 49903, 49891, 49880, 49868, 49856, 49844, 49832, 49820, + 49808, 49795, 49783, 49771, 49759, 49747, 49734, 49722, 49709, 49697, + 49685, 49672, 49660, 49647, 49634, 49622, 49609, 49596, 49583, 49571, + 49558, 49545, 49532, 49519, 49506, 49493, 49480, 49467, 49454, 49440, + 49427, 49414, 49401, 49387, 49374, 49361, 49347, 49334, 49320, 49307, + 49293, 49279, 49266, 49252, 49238, 49224, 49211, 49197, 49183, 49169, + 49155, 49141, 49127, 49113, 49099, 49084, 49070, 49056, 49042, 49027, + 49013, 48999, 48984, 48970, 48955, 48941, 48926, 48912, 48897, 48882, + 48867, 48853, 48838, 48823, 48808, 48793, 48778, 48763, 48748, 48733, + 48718, 48703, 48688, 48673, 48657, 48642, 48627, 48611, 48596, 48581, + 48565, 48550, 48534, 48519, 48503, 48487, 48472, 48456, 48440, 48424, + 48409, 48393, 48377, 48361, 48345, 48329, 48313, 48297, 48281, 48264, + 48248, 48232, 48216, 48199, 48183, 48167, 48150, 48134, 48117, 48101, + 48084, 48068, 48051, 48034, 48017, 48001, 47984, 47967, 47950, 47933, + 47916, 47899, 47882, 47865, 47848, 47831, 47814, 47797, 47780, 47762, + 47745, 47728, 47710, 47693, 47676, 47658, 47641, 47623, 47605, 47588, + 47570, 47552, 47535, 47517, 47499, 47481, 47463, 47445, 47427, 47409, + 47391, 47373, 47355, 47337, 47319, 47301, 47283, 47264, 47246, 47228, + 47209, 47191, 47172, 47154, 47135, 47117, 47098, 47080, 47061, 47042, + 47023, 47005, 46986, 46967, 46948, 46929, 46910, 46891, 46872, 46853, + 46834, 46815, 46796, 46777, 46757, 46738, 46719, 46699, 46680, 46661, + 46641, 46622, 46602, 46582, 46563, 46543, 46524, 46504, 46484, 46464, + 46445, 46425, 46405, 46385, 46365, 46345, 46325, 46305, 46285, 46265, + 46245, 46224, 46204, 46184, 46164, 46143, 46123, 46102, 46082, 46061, + 46041, 46020, 46000, 45979, 45959, 45938, 45917, 45896, 45876, 45855, + 45834, 45813, 45792, 45771, 45750, 45729, 45708, 45687, 45666, 45645, + 45623, 45602, 45581, 45559, 45538, 45517, 45495, 45474, 45452, 45431, + 45409, 45388, 45366, 45344, 45323, 45301, 45279, 45257, 45236, 45214, + 45192, 45170, 45148, 45126, 45104, 45082, 45060, 45037, 45015, 44993, + 44971, 44949, 44926, 44904, 44881, 44859, 44837, 44814, 44792, 44769, + 44746, 44724, 44701, 44678, 44656, 44633, 44610, 44587, 44564, 44542, + 44519, 44496, 44473, 44450, 44427, 44403, 44380, 44357, 44334, 44311, + 44287, 44264, 44241, 44217, 44194, 44171, 44147, 44124, 44100, 44077, + 44053, 44029, 44006, 43982, 43958, 43934, 43911, 43887, 43863, 43839, + 43815, 43791, 43767, 43743, 43719, 43695, 43671, 43647, 43622, 43598, + 43574, 43549, 43525, 43501, 43476, 43452, 43427, 43403, 43378, 43354, + 43329, 43305, 43280, 43255, 43230, 43206, 43181, 43156, 43131, 43106, + 43081, 43056, 43031, 43006, 42981, 42956, 42931, 42906, 42881, 42855, + 42830, 42805, 42780, 42754, 42729, 42703, 42678, 42652, 42627, 42601, + 42576, 42550, 42525, 42499, 42473, 42447, 42422, 42396, 42370, 42344, + 42318, 42292, 42266, 42240, 42214, 42188, 42162, 42136, 42110, 42084, + 42057, 42031, 42005, 41978, 41952, 41926, 41899, 41873, 41846, 41820, + 41793, 41767, 41740, 41713, 41687, 41660, 41633, 41606, 41580, 41553, + 41526, 41499, 41472, 41445, 41418, 41391, 41364, 41337, 41310, 41283, + 41256, 41228, 41201, 41174, 41147, 41119, 41092, 41064, 41037, 41009, + 40982, 40954, 40927, 40899, 40872, 40844, 40816, 40789, 40761, 40733, + 40705, 40677, 40650, 40622, 40594, 40566, 40538, 40510, 40482, 40454, + 40425, 40397, 40369, 40341, 40313, 40284, 40256, 40228, 40199, 40171, + 40143, 40114, 40086, 40057, 40029, 40000, 39971, 39943, 39914, 39885, + 39857, 39828, 39799, 39770, 39741, 39713, 39684, 39655, 39626, 39597, + 39568, 39539, 39510, 39480, 39451, 39422, 39393, 39364, 39334, 39305, + 39276, 39246, 39217, 39188, 39158, 39129, 39099, 39070, 39040, 39010, + 38981, 38951, 38921, 38892, 38862, 38832, 38802, 38773, 38743, 38713, + 38683, 38653, 38623, 38593, 38563, 38533, 38503, 38472, 38442, 38412, + 38382, 38352, 38321, 38291, 38261, 38230, 38200, 38170, 38139, 38109, + 38078, 38048, 38017, 37986, 37956, 37925, 37894, 37864, 37833, 37802, + 37771, 37741, 37710, 37679, 37648, 37617, 37586, 37555, 37524, 37493, + 37462, 37431, 37399, 37368, 37337, 37306, 37275, 37243, 37212, 37181, + 37149, 37118, 37086, 37055, 37024, 36992, 36960, 36929, 36897, 36866, + 36834, 36802, 36771, 36739, 36707, 36675, 36643, 36612, 36580, 36548, + 36516, 36484, 36452, 36420, 36388, 36356, 36324, 36292, 36259, 36227, + 36195, 36163, 36130, 36098, 36066, 36034, 36001, 35969, 35936, 35904, + 35871, 35839, 35806, 35774, 35741, 35709, 35676, 35643, 35610, 35578, + 35545, 35512, 35479, 35447, 35414, 35381, 35348, 35315, 35282, 35249, + 35216, 35183, 35150, 35117, 35083, 35050, 35017, 34984, 34951, 34917, + 34884, 34851, 34817, 34784, 34751, 34717, 34684, 34650, 34617, 34583, + 34550, 34516, 34482, 34449, 34415, 34381, 34348, 34314, 34280, 34246, + 34213, 34179, 34145, 34111, 34077, 34043, 34009, 33975, 33941, 33907, + 33873, 33839, 33805, 33770, 33736, 33702, 33668, 33634, 33599, 33565, + 33531, 33496, 33462, 33427, 33393, 33359, 33324, 33290, 33255, 33220, + 33186, 33151, 33117, 33082, 33047, 33012, 32978, 32943, 32908, 32873, + 32838, 32804, 32769, 32734, 32699, 32664, 32629, 32594, 32559, 32524, + 32489, 32453, 32418, 32383, 32348, 32313, 32277, 32242, 32207, 32172, + 32136, 32101, 32066, 32030, 31995, 31959, 31924, 31888, 31853, 31817, + 31781, 31746, 31710, 31675, 31639, 31603, 31567, 31532, 31496, 31460, + 31424, 31388, 31353, 31317, 31281, 31245, 31209, 31173, 31137, 31101, + 31065, 31029, 30992, 30956, 30920, 30884, 30848, 30812, 30775, 30739, + 30703, 30666, 30630, 30594, 30557, 30521, 30484, 30448, 30411, 30375, + 30338, 30302, 30265, 30229, 30192, 30155, 30119, 30082, 30045, 30008, + 29972, 29935, 29898, 29861, 29824, 29788, 29751, 29714, 29677, 29640, + 29603, 29566, 29529, 29492, 29455, 29417, 29380, 29343, 29306, 29269, + 29232, 29194, 29157, 29120, 29082, 29045, 29008, 28970, 28933, 28896, + 28858, 28821, 28783, 28746, 28708, 28671, 28633, 28595, 28558, 28520, + 28483, 28445, 28407, 28369, 28332, 28294, 28256, 28218, 28180, 28143, + 28105, 28067, 28029, 27991, 27953, 27915, 27877, 27839, 27801, 27763, + 27725, 27687, 27649, 27610, 27572, 27534, 27496, 27458, 27419, 27381, + 27343, 27304, 27266, 27228, 27189, 27151, 27113, 27074, 27036, 26997, + 26959, 26920, 26882, 26843, 26804, 26766, 26727, 26688, 26650, 26611, + 26572, 26534, 26495, 26456, 26417, 26379, 26340, 26301, 26262, 26223, + 26184, 26145, 26106, 26067, 26028, 25989, 25950, 25911, 25872, 25833, + 25794, 25755, 25716, 25676, 25637, 25598, 25559, 25520, 25480, 25441, + 25402, 25362, 25323, 25284, 25244, 25205, 25165, 25126, 25087, 25047, + 25008, 24968, 24929, 24889, 24849, 24810, 24770, 24731, 24691, 24651, + 24612, 24572, 24532, 24492, 24453, 24413, 24373, 24333, 24293, 24253, + 24214, 24174, 24134, 24094, 24054, 24014, 23974, 23934, 23894, 23854, + 23814, 23774, 23734, 23694, 23653, 23613, 23573, 23533, 23493, 23452, + 23412, 23372, 23332, 23291, 23251, 23211, 23170, 23130, 23090, 23049, + 23009, 22968, 22928, 22887, 22847, 22806, 22766, 22725, 22685, 22644, + 22604, 22563, 22522, 22482, 22441, 22400, 22360, 22319, 22278, 22238, + 22197, 22156, 22115, 22074, 22034, 21993, 21952, 21911, 21870, 21829, + 21788, 21747, 21706, 21665, 21624, 21583, 21542, 21501, 21460, 21419, + 21378, 21337, 21296, 21255, 21213, 21172, 21131, 21090, 21049, 21007, + 20966, 20925, 20883, 20842, 20801, 20760, 20718, 20677, 20635, 20594, + 20553, 20511, 20470, 20428, 20387, 20345, 20304, 20262, 20221, 20179, + 20138, 20096, 20054, 20013, 19971, 19929, 19888, 19846, 19804, 19763, + 19721, 19679, 19637, 19596, 19554, 19512, 19470, 19428, 19387, 19345, + 19303, 19261, 19219, 19177, 19135, 19093, 19051, 19009, 18967, 18925, + 18883, 18841, 18799, 18757, 18715, 18673, 18631, 18589, 18547, 18504, + 18462, 18420, 18378, 18336, 18293, 18251, 18209, 18167, 18124, 18082, + 18040, 17997, 17955, 17913, 17870, 17828, 17786, 17743, 17701, 17658, + 17616, 17573, 17531, 17489, 17446, 17404, 17361, 17318, 17276, 17233, + 17191, 17148, 17106, 17063, 17020, 16978, 16935, 16892, 16850, 16807, + 16764, 16722, 16679, 16636, 16593, 16551, 16508, 16465, 16422, 16379, + 16337, 16294, 16251, 16208, 16165, 16122, 16079, 16036, 15993, 15950, + 15907, 15865, 15822, 15779, 15736, 15693, 15649, 15606, 15563, 15520, + 15477, 15434, 15391, 15348, 15305, 15262, 15219, 15175, 15132, 15089, + 15046, 15003, 14959, 14916, 14873, 14830, 14786, 14743, 14700, 14657, + 14613, 14570, 14527, 14483, 14440, 14397, 14353, 14310, 14266, 14223, + 14180, 14136, 14093, 14049, 14006, 13962, 13919, 13875, 13832, 13788, + 13745, 13701, 13658, 13614, 13571, 13527, 13483, 13440, 13396, 13353, + 13309, 13265, 13222, 13178, 13134, 13091, 13047, 13003, 12959, 12916, + 12872, 12828, 12785, 12741, 12697, 12653, 12609, 12566, 12522, 12478, + 12434, 12390, 12346, 12303, 12259, 12215, 12171, 12127, 12083, 12039, + 11995, 11951, 11907, 11864, 11820, 11776, 11732, 11688, 11644, 11600, + 11556, 11512, 11468, 11424, 11379, 11335, 11291, 11247, 11203, 11159, + 11115, 11071, 11027, 10983, 10939, 10894, 10850, 10806, 10762, 10718, + 10674, 10629, 10585, 10541, 10497, 10452, 10408, 10364, 10320, 10275, + 10231, 10187, 10143, 10098, 10054, 10010, 9965, 9921, 9877, 9832, + 9788, 9744, 9699, 9655, 9611, 9566, 9522, 9478, 9433, 9389, + 9344, 9300, 9255, 9211, 9167, 9122, 9078, 9033, 8989, 8944, + 8900, 8855, 8811, 8766, 8722, 8677, 8633, 8588, 8544, 8499, + 8454, 8410, 8365, 8321, 8276, 8232, 8187, 8142, 8098, 8053, + 8009, 7964, 7919, 7875, 7830, 7785, 7741, 7696, 7651, 7607, + 7562, 7517, 7473, 7428, 7383, 7339, 7294, 7249, 7204, 7160, + 7115, 7070, 7025, 6981, 6936, 6891, 6846, 6802, 6757, 6712, + 6667, 6623, 6578, 6533, 6488, 6443, 6398, 6354, 6309, 6264, + 6219, 6174, 6129, 6085, 6040, 5995, 5950, 5905, 5860, 5815, + 5770, 5726, 5681, 5636, 5591, 5546, 5501, 5456, 5411, 5366, + 5321, 5276, 5232, 5187, 5142, 5097, 5052, 5007, 4962, 4917, + 4872, 4827, 4782, 4737, 4692, 4647, 4602, 4557, 4512, 4467, + 4422, 4377, 4332, 4287, 4242, 4197, 4152, 4107, 4062, 4017, + 3972, 3927, 3882, 3837, 3792, 3746, 3701, 3656, 3611, 3566, + 3521, 3476, 3431, 3386, 3341, 3296, 3251, 3206, 3161, 3115, + 3070, 3025, 2980, 2935, 2890, 2845, 2800, 2755, 2710, 2664, + 2619, 2574, 2529, 2484, 2439, 2394, 2349, 2303, 2258, 2213, + 2168, 2123, 2078, 2033, 1987, 1942, 1897, 1852, 1807, 1762, + 1717, 1671, 1626, 1581, 1536, 1491, 1446, 1400, 1355, 1310, + 1265, 1220, 1175, 1129, 1084, 1039, 994, 949, 904, 858, + 813, 768, 723, 678, 633, 587, 542, 497, 452, 407, + 361, 316, 271, 226, 181, 136, 90, 45, 0, 0, +}; diff --git a/software/include/tf_click_2.h b/software/include/tf_click_2.h new file mode 100644 index 0000000..d1a895a --- /dev/null +++ b/software/include/tf_click_2.h @@ -0,0 +1,362 @@ +const int tf_click_2[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -2, -2, -2, -2, -2, + -2, -2, -2, -2, -2, -2, -3, -3, -3, -3, + -3, -3, -3, -3, -3, -4, -4, -4, -4, -4, + -4, -5, -5, -5, -5, -5, -5, -6, -6, -6, + -6, -6, -7, -7, -7, -7, -8, -8, -8, -8, + -9, -9, -9, -9, -10, -10, -10, -10, -11, -11, + -11, -12, -12, -12, -13, -13, -14, -14, -14, -15, + -15, -15, -16, -16, -17, -17, -18, -18, -18, -19, + -19, -20, -20, -21, -21, -22, -22, -23, -24, -24, + -25, -25, -26, -27, -27, -28, -28, -29, -30, -30, + -31, -32, -32, -33, -34, -35, -35, -36, -37, -38, + -38, -39, -40, -41, -42, -43, -43, -44, -45, -46, + -47, -48, -49, -50, -51, -52, -53, -54, -55, -56, + -57, -58, -59, -60, -62, -63, -64, -65, -66, -67, + -69, -70, -71, -72, -74, -75, -76, -78, -79, -80, + -82, -83, -85, -86, -88, -89, -91, -92, -94, -95, + -97, -98, -100, -102, -103, -105, -107, -108, -110, -112, + -114, -115, -117, -119, -121, -123, -125, -127, -129, -131, + -133, -135, -137, -139, -141, -143, -145, -147, -149, -152, + -154, -156, -158, -161, -163, -165, -168, -170, -173, -175, + -177, -180, -182, -185, -188, -190, -193, -195, -198, -201, + -204, -206, -209, -212, -215, -218, -221, -223, -226, -229, + -232, -235, -239, -242, -245, -248, -251, -254, -258, -261, + -264, -268, -271, -274, -278, -281, -285, -288, -292, -295, + -299, -303, -306, -310, -314, -318, -321, -325, -329, -333, + -337, -341, -345, -349, -353, -357, -362, -366, -370, -374, + -378, -383, -387, -392, -396, -401, -405, -410, -414, -419, + -424, -428, -433, -438, -443, -447, -452, -457, -462, -467, + -472, -477, -483, -488, -493, -498, -503, -509, -514, -520, + -525, -531, -536, -542, -547, -553, -559, -564, -570, -576, + -582, -588, -594, -600, -606, -612, -618, -624, -631, -637, + -643, -649, -656, -662, -669, -675, -682, -689, -695, -702, + -709, -716, -722, -729, -736, -743, -750, -757, -765, -772, + -779, -786, -794, -801, -809, -816, -824, -831, -839, -847, + -854, -862, -870, -878, -886, -894, -902, -910, -918, -926, + -935, -943, -951, -960, -968, -977, -985, -994, -1002, -1011, + -1020, -1029, -1038, -1047, -1056, -1065, -1074, -1083, -1092, -1101, + -1111, -1120, -1130, -1139, -1149, -1158, -1168, -1178, -1187, -1197, + -1207, -1217, -1227, -1237, -1247, -1258, -1268, -1278, -1288, -1299, + -1309, -1320, -1330, -1341, -1352, -1363, -1373, -1384, -1395, -1406, + -1417, -1429, -1440, -1451, -1462, -1474, -1485, -1497, -1508, -1520, + -1532, -1543, -1555, -1567, -1579, -1591, -1603, -1615, -1628, -1640, + -1652, -1665, -1677, -1689, -1702, -1715, -1727, -1740, -1753, -1766, + -1779, -1792, -1805, -1818, -1832, -1845, -1858, -1872, -1885, -1899, + -1913, -1926, -1940, -1954, -1968, -1982, -1996, -2010, -2024, -2038, + -2053, -2067, -2082, -2096, -2111, -2125, -2140, -2155, -2170, -2185, + -2200, -2215, -2230, -2245, -2261, -2276, -2292, -2307, -2323, -2338, + -2354, -2370, -2386, -2402, -2418, -2434, -2450, -2466, -2483, -2499, + -2516, -2532, -2549, -2566, -2582, -2599, -2616, -2633, -2650, -2667, + -2684, -2702, -2719, -2737, -2754, -2772, -2789, -2807, -2825, -2843, + -2861, -2879, -2897, -2915, -2933, -2952, -2970, -2989, -3007, -3026, + -3045, -3064, -3083, -3101, -3121, -3140, -3159, -3178, -3198, -3217, + -3237, -3256, -3276, -3296, -3315, -3335, -3355, -3375, -3396, -3416, + -3436, -3457, -3477, -3498, -3518, -3539, -3560, -3581, -3602, -3623, + -3644, -3665, -3686, -3708, -3729, -3751, -3772, -3794, -3816, -3837, + -3859, -3881, -3904, -3926, -3948, -3970, -3993, -4015, -4038, -4061, + -4083, -4106, -4129, -4152, -4175, -4198, -4222, -4245, -4268, -4292, + -4316, -4339, -4363, -4387, -4411, -4435, -4459, -4483, -4507, -4532, + -4556, -4581, -4605, -4630, -4655, -4680, -4705, -4730, -4755, -4780, + -4805, -4831, -4856, -4882, -4907, -4933, -4959, -4985, -5011, -5037, + -5063, -5089, -5115, -5142, -5168, -5195, -5222, -5248, -5275, -5302, + -5329, -5356, -5384, -5411, -5438, -5466, -5493, -5521, -5548, -5576, + -5604, -5632, -5660, -5688, -5717, -5745, -5773, -5802, -5830, -5859, + -5888, -5917, -5946, -5975, -6004, -6033, -6062, -6092, -6121, -6151, + -6180, -6210, -6240, -6270, -6300, -6330, -6360, -6390, -6421, -6451, + -6482, -6512, -6543, -6574, -6605, -6636, -6667, -6698, -6729, -6760, + -6792, -6823, -6855, -6886, -6918, -6950, -6982, -7014, -7046, -7078, + -7111, -7143, -7175, -7208, -7241, -7273, -7306, -7339, -7372, -7405, + -7438, -7472, -7505, -7539, -7572, -7606, -7639, -7673, -7707, -7741, + -7775, -7809, -7844, -7878, -7912, -7947, -7981, -8016, -8051, -8086, + -8121, -8156, -8191, -8226, -8261, -8297, -8332, -8368, -8403, -8439, + -8475, -8511, -8547, -8583, -8619, -8656, -8692, -8728, -8765, -8802, + -8838, -8875, -8912, -8949, -8986, -9023, -9060, -9098, -9135, -9173, + -9210, -9248, -9286, -9323, -9361, -9399, -9438, -9476, -9514, -9552, + -9591, -9629, -9668, -9707, -9746, -9784, -9823, -9862, -9902, -9941, + -9980, -10020, -10059, -10099, -10138, -10178, -10218, -10258, -10298, -10338, + -10378, -10418, -10459, -10499, -10540, -10580, -10621, -10662, -10703, -10744, + -10785, -10826, -10867, -10908, -10950, -10991, -11032, -11074, -11116, -11158, + -11199, -11241, -11283, -11326, -11368, -11410, -11452, -11495, -11537, -11580, + -11623, -11666, -11708, -11751, -11794, -11837, -11881, -11924, -11967, -12011, + -12054, -12098, -12141, -12185, -12229, -12273, -12317, -12361, -12405, -12450, + -12494, -12538, -12583, -12627, -12672, -12717, -12761, -12806, -12851, -12896, + -12941, -12987, -13032, -13077, -13123, -13168, -13214, -13260, -13305, -13351, + -13397, -13443, -13489, -13535, -13581, -13628, -13674, -13720, -13767, -13814, + -13860, -13907, -13954, -14001, -14048, -14095, -14142, -14189, -14236, -14284, + -14331, -14379, -14426, -14474, -14521, -14569, -14617, -14665, -14713, -14761, + -14809, -14857, -14906, -14954, -15003, -15051, -15100, -15148, -15197, -15246, + -15295, -15344, -15393, -15442, -15491, -15540, -15589, -15639, -15688, -15738, + -15787, -15837, -15887, -15936, -15986, -16036, -16086, -16136, -16186, -16236, + -16287, -16337, -16387, -16438, -16488, -16539, -16590, -16640, -16691, -16742, + -16793, -16844, -16895, -16946, -16997, -17048, -17100, -17151, -17202, -17254, + -17305, -17357, -17409, -17460, -17512, -17564, -17616, -17668, -17720, -17772, + -17824, -17876, -17929, -17981, -18033, -18086, -18138, -18191, -18244, -18296, + -18349, -18402, -18455, -18508, -18561, -18614, -18667, -18720, -18773, -18826, + -18880, -18933, -18986, -19040, -19093, -19147, -19201, -19254, -19308, -19362, + -19416, -19470, -19524, -19578, -19632, -19686, -19740, -19794, -19848, -19903, + -19957, -20012, -20066, -20121, -20175, -20230, -20285, -20339, -20394, -20449, + -20504, -20559, -20614, -20669, -20724, -20779, -20834, -20889, -20944, -21000, + -21055, -21110, -21166, -21221, -21277, -21332, -21388, -21444, -21499, -21555, + -21611, -21667, -21722, -21778, -21834, -21890, -21946, -22002, -22058, -22115, + -22171, -22227, -22283, -22340, -22396, -22452, -22509, -22565, -22622, -22678, + -22735, -22791, -22848, -22905, -22961, -23018, -23075, -23132, -23188, -23245, + -23302, -23359, -23416, -23473, -23530, -23587, -23644, -23702, -23759, -23816, + -23873, -23930, -23988, -24045, -24102, -24160, -24217, -24275, -24332, -24390, + -24447, -24505, -24562, -24620, -24677, -24735, -24793, -24850, -24908, -24966, + -25024, -25081, -25139, -25197, -25255, -25313, -25371, -25429, -25487, -25545, + -25603, -25661, -25719, -25777, -25835, -25893, -25951, -26009, -26067, -26125, + -26184, -26242, -26300, -26358, -26417, -26475, -26533, -26591, -26650, -26708, + -26766, -26825, -26883, -26942, -27000, -27058, -27117, -27175, -27234, -27292, + -27351, -27409, -27468, -27526, -27585, -27643, -27702, -27760, -27819, -27877, + -27936, -27994, -28053, -28111, -28170, -28229, -28287, -28346, -28404, -28463, + -28522, -28580, -28639, -28697, -28756, -28815, -28873, -28932, -28991, -29049, + -29108, -29166, -29225, -29284, -29342, -29401, -29460, -29518, -29577, -29635, + -29694, -29753, -29811, -29870, -29928, -29987, -30046, -30104, -30163, -30221, + -30280, -30338, -30397, -30455, -30514, -30572, -30631, -30689, -30748, -30806, + -30865, -30923, -30982, -31040, -31099, -31157, -31215, -31274, -31332, -31391, + -31449, -31507, -31566, -31624, -31682, -31740, -31799, -31857, -31915, -31973, + -32031, -32090, -32148, -32206, -32264, -32322, -32380, -32438, -32496, -32554, + -32612, -32670, -32728, -32786, -32844, -32902, -32959, -33017, -33075, -33133, + -33191, -33248, -33306, -33364, -33421, -33479, -33536, -33594, -33651, -33709, + -33766, -33824, -33881, -33939, -33996, -34053, -34111, -34168, -34225, -34282, + -34339, -34396, -34454, -34511, -34568, -34625, -34681, -34738, -34795, -34852, + -34909, -34966, -35022, -35079, -35136, -35192, -35249, -35305, -35362, -35418, + -35475, -35531, -35587, -35644, -35700, -35756, -35812, -35868, -35925, -35981, + -36037, -36092, -36148, -36204, -36260, -36316, -36371, -36427, -36483, -36538, + -36594, -36649, -36705, -36760, -36815, -36871, -36926, -36981, -37036, -37091, + -37146, -37201, -37256, -37311, -37366, -37421, -37475, -37530, -37585, -37639, + -37694, -37748, -37802, -37857, -37911, -37965, -38019, -38073, -38127, -38181, + -38235, -38289, -38343, -38397, -38450, -38504, -38557, -38611, -38664, -38718, + -38771, -38824, -38877, -38930, -38983, -39036, -39089, -39142, -39195, -39248, + -39300, -39353, -39405, -39458, -39510, -39563, -39615, -39667, -39719, -39771, + -39823, -39875, -39927, -39978, -40030, -40082, -40133, -40185, -40236, -40287, + -40339, -40390, -40441, -40492, -40543, -40594, -40644, -40695, -40746, -40796, + -40847, -40897, -40948, -40998, -41048, -41098, -41148, -41198, -41248, -41298, + -41347, -41397, -41446, -41496, -41545, -41595, -41644, -41693, -41742, -41791, + -41840, -41888, -41937, -41986, -42034, -42083, -42131, -42179, -42227, -42275, + -42323, -42371, -42419, -42467, -42515, -42562, -42610, -42657, -42704, -42751, + -42798, -42845, -42892, -42939, -42986, -43033, -43079, -43126, -43172, -43218, + -43264, -43310, -43356, -43402, -43448, -43494, -43539, -43585, -43630, -43675, + -43721, -43766, -43811, -43856, -43900, -43945, -43990, -44034, -44079, -44123, + -44167, -44211, -44255, -44299, -44343, -44387, -44430, -44474, -44517, -44560, + -44604, -44647, -44690, -44732, -44775, -44818, -44860, -44903, -44945, -44987, + -45029, -45071, -45113, -45155, -45197, -45238, -45280, -45321, -45362, -45404, + -45445, -45486, -45526, -45567, -45608, -45648, -45688, -45729, -45769, -45809, + -45849, -45888, -45928, -45968, -46007, -46046, -46086, -46125, -46164, -46203, + -46241, -46280, -46318, -46357, -46395, -46433, -46471, -46509, -46547, -46585, + -46622, -46660, -46697, -46734, -46771, -46808, -46845, -46882, -46919, -46955, + -46991, -47028, -47064, -47100, -47136, -47171, -47207, -47243, -47278, -47313, + -47348, -47383, -47418, -47453, -47488, -47522, -47556, -47591, -47625, -47659, + -47693, -47726, -47760, -47794, -47827, -47860, -47893, -47926, -47959, -47992, + -48024, -48057, -48089, -48121, -48153, -48185, -48217, -48249, -48280, -48312, + -48343, -48374, -48405, -48436, -48467, -48497, -48528, -48558, -48588, -48619, + -48648, -48678, -48708, -48737, -48767, -48796, -48825, -48854, -48883, -48912, + -48940, -48969, -48997, -49025, -49053, -49081, -49109, -49137, -49164, -49192, + -49219, -49246, -49273, -49300, -49326, -49353, -49379, -49405, -49431, -49457, + -49483, -49509, -49534, -49560, -49585, -49610, -49635, -49660, -49685, -49709, + -49734, -49758, -49782, -49806, -49830, -49854, -49877, -49900, -49924, -49947, + -49970, -49993, -50015, -50038, -50060, -50082, -50105, -50126, -50148, -50170, + -50191, -50213, -50234, -50255, -50276, -50297, -50317, -50338, -50358, -50378, + -50399, -50418, -50438, -50458, -50477, -50497, -50516, -50535, -50554, -50572, + -50591, -50609, -50628, -50646, -50664, -50681, -50699, -50717, -50734, -50751, + -50768, -50785, -50802, -50819, -50835, -50851, -50868, -50884, -50899, -50915, + -50931, -50946, -50961, -50976, -50991, -51006, -51021, -51035, -51050, -51064, + -51078, -51092, -51105, -51119, -51132, -51146, -51159, -51172, -51185, -51197, + -51210, -51222, -51234, -51246, -51258, -51270, -51282, -51293, -51304, -51315, + -51326, -51337, -51348, -51358, -51369, -51379, -51389, -51399, -51408, -51418, + -51427, -51437, -51446, -51455, -51463, -51472, -51481, -51489, -51497, -51505, + -51513, -51521, -51528, -51536, -51543, -51550, -51557, -51564, -51570, -51577, + -51583, -51589, -51595, -51601, -51606, -51612, -51617, -51623, -51628, -51632, + -51637, -51642, -51646, -51650, -51654, -51658, -51662, -51666, -51669, -51673, + -51676, -51679, -51682, -51684, -51687, -51689, -51691, -51693, -51695, -51697, + -51916, -51399, -52412, -50644, -53538, -48984, -56088, -44652, -65529, -34, + 65535, 44650, 56089, 48983, 53539, 50643, 52413, 51398, 51916, 51697, + 51695, 51693, 51691, 51689, 51687, 51684, 51682, 51679, 51676, 51673, + 51669, 51666, 51662, 51658, 51654, 51650, 51646, 51642, 51637, 51632, + 51628, 51623, 51617, 51612, 51606, 51601, 51595, 51589, 51583, 51577, + 51570, 51564, 51557, 51550, 51543, 51536, 51528, 51521, 51513, 51505, + 51497, 51489, 51481, 51472, 51463, 51455, 51446, 51437, 51427, 51418, + 51408, 51399, 51389, 51379, 51369, 51358, 51348, 51337, 51326, 51315, + 51304, 51293, 51282, 51270, 51258, 51246, 51234, 51222, 51210, 51197, + 51185, 51172, 51159, 51146, 51132, 51119, 51105, 51092, 51078, 51064, + 51050, 51035, 51021, 51006, 50991, 50976, 50961, 50946, 50931, 50915, + 50899, 50884, 50868, 50851, 50835, 50819, 50802, 50785, 50768, 50751, + 50734, 50717, 50699, 50681, 50664, 50646, 50628, 50609, 50591, 50572, + 50554, 50535, 50516, 50497, 50477, 50458, 50438, 50418, 50399, 50379, + 50358, 50338, 50317, 50297, 50276, 50255, 50234, 50213, 50191, 50170, + 50148, 50126, 50105, 50082, 50060, 50038, 50015, 49993, 49970, 49947, + 49924, 49900, 49877, 49854, 49830, 49806, 49782, 49758, 49734, 49709, + 49685, 49660, 49635, 49610, 49585, 49560, 49534, 49509, 49483, 49457, + 49431, 49405, 49379, 49353, 49326, 49300, 49273, 49246, 49219, 49192, + 49164, 49137, 49109, 49081, 49053, 49025, 48997, 48969, 48940, 48912, + 48883, 48854, 48825, 48796, 48767, 48737, 48708, 48678, 48648, 48619, + 48588, 48558, 48528, 48497, 48467, 48436, 48405, 48374, 48343, 48312, + 48280, 48249, 48217, 48185, 48153, 48121, 48089, 48057, 48024, 47992, + 47959, 47926, 47893, 47860, 47827, 47794, 47760, 47726, 47693, 47659, + 47625, 47591, 47556, 47522, 47488, 47453, 47418, 47383, 47348, 47313, + 47278, 47243, 47207, 47171, 47136, 47100, 47064, 47028, 46991, 46955, + 46919, 46882, 46845, 46808, 46771, 46734, 46697, 46660, 46622, 46585, + 46547, 46509, 46471, 46433, 46395, 46357, 46318, 46280, 46241, 46203, + 46164, 46125, 46086, 46046, 46007, 45968, 45928, 45888, 45849, 45809, + 45769, 45729, 45688, 45648, 45608, 45567, 45526, 45486, 45445, 45404, + 45362, 45321, 45280, 45238, 45197, 45155, 45113, 45071, 45029, 44987, + 44945, 44903, 44860, 44818, 44775, 44732, 44690, 44647, 44604, 44560, + 44517, 44474, 44430, 44387, 44343, 44299, 44255, 44211, 44167, 44123, + 44079, 44034, 43990, 43945, 43900, 43856, 43811, 43766, 43721, 43675, + 43630, 43585, 43539, 43494, 43448, 43402, 43356, 43310, 43264, 43218, + 43172, 43126, 43079, 43033, 42986, 42939, 42892, 42845, 42798, 42751, + 42704, 42657, 42610, 42562, 42515, 42467, 42419, 42371, 42323, 42275, + 42227, 42179, 42131, 42083, 42034, 41986, 41937, 41888, 41840, 41791, + 41742, 41693, 41644, 41595, 41545, 41496, 41446, 41397, 41347, 41298, + 41248, 41198, 41148, 41098, 41048, 40998, 40948, 40897, 40847, 40796, + 40746, 40695, 40645, 40594, 40543, 40492, 40441, 40390, 40339, 40287, + 40236, 40185, 40133, 40082, 40030, 39978, 39927, 39875, 39823, 39771, + 39719, 39667, 39615, 39563, 39510, 39458, 39405, 39353, 39300, 39248, + 39195, 39142, 39089, 39036, 38983, 38930, 38877, 38824, 38771, 38718, + 38664, 38611, 38557, 38504, 38450, 38397, 38343, 38289, 38235, 38181, + 38127, 38073, 38019, 37965, 37911, 37857, 37802, 37748, 37694, 37639, + 37585, 37530, 37475, 37421, 37366, 37311, 37256, 37201, 37146, 37091, + 37036, 36981, 36926, 36871, 36815, 36760, 36705, 36649, 36594, 36538, + 36483, 36427, 36371, 36316, 36260, 36204, 36148, 36092, 36037, 35981, + 35925, 35868, 35812, 35756, 35700, 35644, 35587, 35531, 35475, 35418, + 35362, 35305, 35249, 35192, 35136, 35079, 35022, 34966, 34909, 34852, + 34795, 34738, 34681, 34625, 34568, 34511, 34454, 34396, 34339, 34282, + 34225, 34168, 34111, 34053, 33996, 33939, 33881, 33824, 33766, 33709, + 33651, 33594, 33536, 33479, 33421, 33364, 33306, 33248, 33191, 33133, + 33075, 33017, 32959, 32902, 32844, 32786, 32728, 32670, 32612, 32554, + 32496, 32438, 32380, 32322, 32264, 32206, 32148, 32090, 32031, 31973, + 31915, 31857, 31799, 31740, 31682, 31624, 31566, 31507, 31449, 31391, + 31332, 31274, 31215, 31157, 31099, 31040, 30982, 30923, 30865, 30806, + 30748, 30689, 30631, 30572, 30514, 30455, 30397, 30338, 30280, 30221, + 30163, 30104, 30046, 29987, 29928, 29870, 29811, 29753, 29694, 29635, + 29577, 29518, 29460, 29401, 29342, 29284, 29225, 29166, 29108, 29049, + 28991, 28932, 28873, 28815, 28756, 28697, 28639, 28580, 28522, 28463, + 28404, 28346, 28287, 28229, 28170, 28111, 28053, 27994, 27936, 27877, + 27819, 27760, 27702, 27643, 27585, 27526, 27468, 27409, 27351, 27292, + 27234, 27175, 27117, 27058, 27000, 26942, 26883, 26825, 26766, 26708, + 26650, 26591, 26533, 26475, 26417, 26358, 26300, 26242, 26184, 26125, + 26067, 26009, 25951, 25893, 25835, 25777, 25719, 25661, 25603, 25545, + 25487, 25429, 25371, 25313, 25255, 25197, 25139, 25081, 25024, 24966, + 24908, 24850, 24793, 24735, 24677, 24620, 24562, 24505, 24447, 24390, + 24332, 24275, 24217, 24160, 24102, 24045, 23988, 23930, 23873, 23816, + 23759, 23702, 23644, 23587, 23530, 23473, 23416, 23359, 23302, 23245, + 23188, 23132, 23075, 23018, 22961, 22905, 22848, 22791, 22735, 22678, + 22622, 22565, 22509, 22452, 22396, 22340, 22283, 22227, 22171, 22115, + 22058, 22002, 21946, 21890, 21834, 21778, 21722, 21667, 21611, 21555, + 21499, 21444, 21388, 21332, 21277, 21221, 21166, 21110, 21055, 21000, + 20944, 20889, 20834, 20779, 20724, 20669, 20614, 20559, 20504, 20449, + 20394, 20339, 20285, 20230, 20175, 20121, 20066, 20012, 19957, 19903, + 19849, 19794, 19740, 19686, 19632, 19578, 19524, 19470, 19416, 19362, + 19308, 19254, 19201, 19147, 19093, 19040, 18986, 18933, 18880, 18826, + 18773, 18720, 18667, 18614, 18561, 18508, 18455, 18402, 18349, 18296, + 18244, 18191, 18138, 18086, 18033, 17981, 17929, 17876, 17824, 17772, + 17720, 17668, 17616, 17564, 17512, 17460, 17409, 17357, 17305, 17254, + 17202, 17151, 17100, 17048, 16997, 16946, 16895, 16844, 16793, 16742, + 16691, 16640, 16590, 16539, 16488, 16438, 16387, 16337, 16287, 16236, + 16186, 16136, 16086, 16036, 15986, 15936, 15887, 15837, 15787, 15738, + 15688, 15639, 15589, 15540, 15491, 15442, 15393, 15344, 15295, 15246, + 15197, 15148, 15100, 15051, 15003, 14954, 14906, 14857, 14809, 14761, + 14713, 14665, 14617, 14569, 14521, 14474, 14426, 14379, 14331, 14284, + 14236, 14189, 14142, 14095, 14048, 14001, 13954, 13907, 13860, 13814, + 13767, 13720, 13674, 13628, 13581, 13535, 13489, 13443, 13397, 13351, + 13305, 13260, 13214, 13168, 13123, 13077, 13032, 12987, 12941, 12896, + 12851, 12806, 12761, 12717, 12672, 12627, 12583, 12538, 12494, 12450, + 12405, 12361, 12317, 12273, 12229, 12185, 12142, 12098, 12054, 12011, + 11967, 11924, 11881, 11837, 11794, 11751, 11708, 11666, 11623, 11580, + 11537, 11495, 11452, 11410, 11368, 11326, 11283, 11241, 11199, 11158, + 11116, 11074, 11033, 10991, 10950, 10908, 10867, 10826, 10785, 10744, + 10703, 10662, 10621, 10580, 10540, 10499, 10459, 10418, 10378, 10338, + 10298, 10258, 10218, 10178, 10138, 10099, 10059, 10020, 9980, 9941, + 9902, 9862, 9823, 9784, 9746, 9707, 9668, 9629, 9591, 9552, + 9514, 9476, 9438, 9399, 9361, 9323, 9286, 9248, 9210, 9173, + 9135, 9098, 9060, 9023, 8986, 8949, 8912, 8875, 8838, 8802, + 8765, 8728, 8692, 8656, 8619, 8583, 8547, 8511, 8475, 8439, + 8403, 8368, 8332, 8297, 8261, 8226, 8191, 8156, 8121, 8086, + 8051, 8016, 7981, 7947, 7912, 7878, 7844, 7809, 7775, 7741, + 7707, 7673, 7639, 7606, 7572, 7539, 7505, 7472, 7438, 7405, + 7372, 7339, 7306, 7273, 7241, 7208, 7176, 7143, 7111, 7078, + 7046, 7014, 6982, 6950, 6918, 6886, 6855, 6823, 6792, 6760, + 6729, 6698, 6667, 6636, 6605, 6574, 6543, 6512, 6482, 6451, + 6421, 6390, 6360, 6330, 6300, 6270, 6240, 6210, 6180, 6151, + 6121, 6092, 6062, 6033, 6004, 5975, 5946, 5917, 5888, 5859, + 5830, 5802, 5773, 5745, 5717, 5688, 5660, 5632, 5604, 5576, + 5548, 5521, 5493, 5466, 5438, 5411, 5384, 5356, 5329, 5302, + 5275, 5248, 5222, 5195, 5168, 5142, 5116, 5089, 5063, 5037, + 5011, 4985, 4959, 4933, 4907, 4882, 4856, 4831, 4805, 4780, + 4755, 4730, 4705, 4680, 4655, 4630, 4605, 4581, 4556, 4532, + 4507, 4483, 4459, 4435, 4411, 4387, 4363, 4339, 4316, 4292, + 4268, 4245, 4222, 4198, 4175, 4152, 4129, 4106, 4083, 4061, + 4038, 4015, 3993, 3970, 3948, 3926, 3904, 3881, 3859, 3837, + 3816, 3794, 3772, 3751, 3729, 3708, 3686, 3665, 3644, 3623, + 3602, 3581, 3560, 3539, 3518, 3498, 3477, 3457, 3436, 3416, + 3396, 3375, 3355, 3335, 3315, 3296, 3276, 3256, 3237, 3217, + 3198, 3178, 3159, 3140, 3121, 3101, 3083, 3064, 3045, 3026, + 3007, 2989, 2970, 2952, 2933, 2915, 2897, 2879, 2861, 2843, + 2825, 2807, 2789, 2772, 2754, 2737, 2719, 2702, 2684, 2667, + 2650, 2633, 2616, 2599, 2582, 2566, 2549, 2532, 2516, 2499, + 2483, 2466, 2450, 2434, 2418, 2402, 2386, 2370, 2354, 2338, + 2323, 2307, 2292, 2276, 2261, 2245, 2230, 2215, 2200, 2185, + 2170, 2155, 2140, 2125, 2111, 2096, 2082, 2067, 2053, 2038, + 2024, 2010, 1996, 1982, 1968, 1954, 1940, 1926, 1913, 1899, + 1885, 1872, 1858, 1845, 1832, 1818, 1805, 1792, 1779, 1766, + 1753, 1740, 1727, 1715, 1702, 1689, 1677, 1665, 1652, 1640, + 1628, 1615, 1603, 1591, 1579, 1567, 1555, 1543, 1532, 1520, + 1508, 1497, 1485, 1474, 1462, 1451, 1440, 1429, 1417, 1406, + 1395, 1384, 1373, 1363, 1352, 1341, 1331, 1320, 1309, 1299, + 1288, 1278, 1268, 1258, 1247, 1237, 1227, 1217, 1207, 1197, + 1187, 1178, 1168, 1158, 1149, 1139, 1130, 1120, 1111, 1101, + 1092, 1083, 1074, 1065, 1056, 1047, 1038, 1029, 1020, 1011, + 1002, 994, 985, 977, 968, 960, 951, 943, 935, 926, + 918, 910, 902, 894, 886, 878, 870, 862, 854, 847, + 839, 831, 824, 816, 809, 801, 794, 786, 779, 772, + 765, 757, 750, 743, 736, 729, 722, 716, 709, 702, + 695, 689, 682, 675, 669, 662, 656, 649, 643, 637, + 631, 624, 618, 612, 606, 600, 594, 588, 582, 576, + 570, 564, 559, 553, 547, 542, 536, 531, 525, 520, + 514, 509, 503, 498, 493, 488, 483, 477, 472, 467, + 462, 457, 452, 447, 443, 438, 433, 428, 424, 419, + 414, 410, 405, 401, 396, 392, 387, 383, 379, 374, + 370, 366, 362, 357, 353, 349, 345, 341, 337, 333, + 329, 325, 321, 318, 314, 310, 306, 303, 299, 295, + 292, 288, 285, 281, 278, 274, 271, 268, 264, 261, + 258, 254, 251, 248, 245, 242, 239, 235, 232, 229, + 226, 223, 221, 218, 215, 212, 209, 206, 204, 201, + 198, 195, 193, 190, 188, 185, 182, 180, 177, 175, + 173, 170, 168, 165, 163, 161, 158, 156, 154, 152, + 149, 147, 145, 143, 141, 139, 137, 135, 133, 131, + 129, 127, 125, 123, 121, 119, 117, 115, 114, 112, + 110, 108, 107, 105, 103, 102, 100, 98, 97, 95, + 94, 92, 91, 89, 88, 86, 85, 83, 82, 80, + 79, 78, 76, 75, 74, 72, 71, 70, 69, 67, + 66, 65, 64, 63, 62, 60, 59, 58, 57, 56, + 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, + 45, 44, 43, 43, 42, 41, 40, 39, 38, 38, + 37, 36, 35, 35, 34, 33, 32, 32, 31, 30, + 30, 29, 28, 28, 27, 27, 26, 25, 25, 24, + 24, 23, 22, 22, 21, 21, 20, 20, 19, 19, + 18, 18, 18, 17, 17, 16, 16, 15, 15, 15, + 14, 14, 14, 13, 13, 12, 12, 12, 11, 11, + 11, 10, 10, 10, 10, 9, 9, 9, 9, 8, + 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, + 6, 6, 5, 5, 5, 5, 5, 5, 4, 4, + 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; diff --git a/software/include/tf_exp_spring.h b/software/include/tf_exp_spring.h new file mode 100644 index 0000000..0d8430a --- /dev/null +++ b/software/include/tf_exp_spring.h @@ -0,0 +1,362 @@ +const int tf_exp_spring[] = { + 62914, 62623, 62335, 62048, 61763, 61480, 61199, 60920, 60643, 60367, + 60094, 59822, 59552, 59283, 59016, 58752, 58488, 58227, 57967, 57709, + 57452, 57197, 56944, 56692, 56442, 56193, 55946, 55701, 55457, 55215, + 54974, 54734, 54496, 54260, 54025, 53792, 53560, 53329, 53100, 52872, + 52646, 52421, 52197, 51975, 51754, 51534, 51316, 51099, 50883, 50669, + 50456, 50244, 50034, 49824, 49616, 49410, 49204, 49000, 48797, 48595, + 48394, 48194, 47996, 47799, 47603, 47408, 47214, 47021, 46830, 46639, + 46450, 46262, 46074, 45888, 45703, 45519, 45336, 45154, 44973, 44794, + 44615, 44437, 44260, 44084, 43909, 43735, 43563, 43391, 43220, 43050, + 42881, 42712, 42545, 42379, 42214, 42049, 41886, 41723, 41561, 41400, + 41240, 41081, 40923, 40765, 40609, 40453, 40298, 40144, 39991, 39839, + 39687, 39536, 39386, 39237, 39089, 38941, 38794, 38648, 38503, 38359, + 38215, 38072, 37930, 37788, 37648, 37508, 37368, 37230, 37092, 36955, + 36818, 36683, 36548, 36413, 36280, 36147, 36015, 35883, 35752, 35622, + 35492, 35363, 35235, 35107, 34980, 34854, 34728, 34603, 34479, 34355, + 34232, 34109, 33987, 33866, 33745, 33625, 33505, 33386, 33268, 33150, + 33033, 32916, 32800, 32685, 32570, 32455, 32341, 32228, 32115, 32003, + 31892, 31780, 31670, 31560, 31450, 31341, 31233, 31125, 31018, 30911, + 30804, 30698, 30593, 30488, 30384, 30280, 30176, 30073, 29971, 29869, + 29767, 29666, 29566, 29466, 29366, 29267, 29168, 29070, 28972, 28875, + 28778, 28682, 28586, 28490, 28395, 28300, 28206, 28112, 28019, 27926, + 27833, 27741, 27650, 27558, 27468, 27377, 27287, 27197, 27108, 27019, + 26931, 26843, 26755, 26668, 26581, 26494, 26408, 26323, 26237, 26152, + 26068, 25983, 25900, 25816, 25733, 25650, 25568, 25486, 25404, 25323, + 25242, 25161, 25081, 25001, 24921, 24842, 24763, 24685, 24607, 24529, + 24451, 24374, 24297, 24221, 24144, 24068, 23993, 23918, 23843, 23768, + 23694, 23620, 23546, 23473, 23400, 23327, 23254, 23182, 23110, 23039, + 22968, 22897, 22826, 22756, 22685, 22616, 22546, 22477, 22408, 22339, + 22271, 22203, 22135, 22068, 22000, 21933, 21867, 21800, 21734, 21668, + 21603, 21537, 21472, 21407, 21343, 21278, 21214, 21151, 21087, 21024, + 20961, 20898, 20835, 20773, 20711, 20649, 20588, 20526, 20465, 20405, + 20344, 20284, 20224, 20164, 20104, 20045, 19986, 19927, 19868, 19809, + 19751, 19693, 19635, 19578, 19520, 19463, 19406, 19350, 19293, 19237, + 19181, 19125, 19070, 19014, 18959, 18904, 18849, 18795, 18740, 18686, + 18632, 18579, 18525, 18472, 18419, 18366, 18313, 18261, 18208, 18156, + 18104, 18052, 18001, 17950, 17898, 17847, 17797, 17746, 17696, 17645, + 17595, 17546, 17496, 17446, 17397, 17348, 17299, 17250, 17202, 17153, + 17105, 17057, 17009, 16962, 16914, 16867, 16820, 16773, 16726, 16679, + 16633, 16586, 16540, 16494, 16448, 16403, 16357, 16312, 16267, 16222, + 16177, 16132, 16088, 16043, 15999, 15955, 15911, 15867, 15824, 15780, + 15737, 15694, 15651, 15608, 15565, 15523, 15480, 15438, 15396, 15354, + 15312, 15271, 15229, 15188, 15147, 15106, 15065, 15024, 14983, 14943, + 14902, 14862, 14822, 14782, 14742, 14703, 14663, 14624, 14584, 14545, + 14506, 14467, 14429, 14390, 14352, 14313, 14275, 14237, 14199, 14161, + 14123, 14086, 14048, 14011, 13974, 13937, 13900, 13863, 13826, 13790, + 13753, 13717, 13681, 13645, 13609, 13573, 13537, 13501, 13466, 13431, + 13395, 13360, 13325, 13290, 13255, 13221, 13186, 13152, 13117, 13083, + 13049, 13015, 12981, 12947, 12913, 12880, 12846, 12813, 12780, 12747, + 12714, 12681, 12648, 12615, 12582, 12550, 12518, 12485, 12453, 12421, + 12389, 12357, 12325, 12294, 12262, 12230, 12199, 12168, 12137, 12106, + 12075, 12044, 12013, 11982, 11952, 11921, 11891, 11860, 11830, 11800, + 11770, 11740, 11710, 11680, 11651, 11621, 11592, 11562, 11533, 11504, + 11475, 11446, 11417, 11388, 11359, 11330, 11302, 11273, 11245, 11217, + 11188, 11160, 11132, 11104, 11076, 11048, 11021, 10993, 10966, 10938, + 10911, 10883, 10856, 10829, 10802, 10775, 10748, 10721, 10695, 10668, + 10641, 10615, 10588, 10562, 10536, 10510, 10484, 10458, 10432, 10406, + 10380, 10354, 10329, 10303, 10278, 10252, 10227, 10202, 10176, 10151, + 10126, 10101, 10076, 10052, 10027, 10002, 9977, 9953, 9929, 9904, + 9880, 9856, 9831, 9807, 9783, 9759, 9735, 9712, 9688, 9664, + 9641, 9617, 9593, 9570, 9547, 9523, 9500, 9477, 9454, 9431, + 9408, 9385, 9362, 9340, 9317, 9294, 9272, 9249, 9227, 9204, + 9182, 9160, 9138, 9116, 9093, 9071, 9050, 9028, 9006, 8984, + 8962, 8941, 8919, 8898, 8876, 8855, 8834, 8812, 8791, 8770, + 8749, 8728, 8707, 8686, 8665, 8644, 8624, 8603, 8582, 8562, + 8541, 8521, 8500, 8480, 8460, 8439, 8419, 8399, 8379, 8359, + 8339, 8319, 8299, 8279, 8260, 8240, 8220, 8201, 8181, 8162, + 8142, 8123, 8104, 8084, 8065, 8046, 8027, 8008, 7989, 7970, + 7951, 7932, 7913, 7895, 7876, 7857, 7839, 7820, 7802, 7783, + 7765, 7746, 7728, 7710, 7692, 7673, 7655, 7637, 7619, 7601, + 7583, 7565, 7547, 7530, 7512, 7494, 7477, 7459, 7441, 7424, + 7406, 7389, 7372, 7354, 7337, 7320, 7303, 7285, 7268, 7251, + 7234, 7217, 7200, 7183, 7167, 7150, 7133, 7116, 7100, 7083, + 7066, 7050, 7033, 7017, 7001, 6984, 6968, 6952, 6935, 6919, + 6903, 6887, 6871, 6855, 6839, 6823, 6807, 6791, 6775, 6759, + 6744, 6728, 6712, 6696, 6681, 6665, 6650, 6634, 6619, 6603, + 6588, 6573, 6557, 6542, 6527, 6512, 6497, 6482, 6466, 6451, + 6436, 6421, 6407, 6392, 6377, 6362, 6347, 6333, 6318, 6303, + 6289, 6274, 6259, 6245, 6230, 6216, 6202, 6187, 6173, 6158, + 6144, 6130, 6116, 6102, 6087, 6073, 6059, 6045, 6031, 6017, + 6003, 5989, 5976, 5962, 5948, 5934, 5920, 5907, 5893, 5879, + 5866, 5852, 5839, 5825, 5812, 5798, 5785, 5772, 5758, 5745, + 5732, 5718, 5705, 5692, 5679, 5666, 5653, 5640, 5627, 5614, + 5601, 5588, 5575, 5562, 5549, 5536, 5523, 5511, 5498, 5485, + 5473, 5460, 5447, 5435, 5422, 5410, 5397, 5385, 5372, 5360, + 5348, 5335, 5323, 5311, 5298, 5286, 5274, 5262, 5250, 5238, + 5225, 5213, 5201, 5189, 5177, 5165, 5154, 5142, 5130, 5118, + 5106, 5094, 5083, 5071, 5059, 5047, 5036, 5024, 5013, 5001, + 4989, 4978, 4966, 4955, 4944, 4932, 4921, 4909, 4898, 4887, + 4875, 4864, 4853, 4842, 4830, 4819, 4808, 4797, 4786, 4775, + 4764, 4753, 4742, 4731, 4720, 4709, 4698, 4687, 4676, 4666, + 4655, 4644, 4633, 4623, 4612, 4601, 4591, 4580, 4569, 4559, + 4548, 4538, 4527, 4517, 4506, 4496, 4485, 4475, 4465, 4454, + 4444, 4434, 4423, 4413, 4403, 4393, 4382, 4372, 4362, 4352, + 4342, 4332, 4322, 4312, 4302, 4292, 4282, 4272, 4262, 4252, + 4242, 4232, 4222, 4213, 4203, 4193, 4183, 4173, 4164, 4154, + 4144, 4135, 4125, 4115, 4106, 4096, 4087, 4077, 4068, 4058, + 4049, 4039, 4030, 4020, 4011, 4002, 3992, 3983, 3974, 3964, + 3955, 3946, 3937, 3927, 3918, 3909, 3900, 3891, 3882, 3872, + 3863, 3854, 3845, 3836, 3827, 3818, 3809, 3800, 3791, 3783, + 3774, 3765, 3756, 3747, 3738, 3729, 3721, 3712, 3703, 3694, + 3686, 3677, 3668, 3660, 3651, 3642, 3634, 3625, 3617, 3608, + 3600, 3591, 3583, 3574, 3566, 3557, 3549, 3540, 3532, 3524, + 3515, 3507, 3499, 3490, 3482, 3474, 3465, 3457, 3449, 3441, + 3433, 3424, 3416, 3408, 3400, 3392, 3384, 3376, 3368, 3360, + 3352, 3344, 3336, 3328, 3320, 3312, 3304, 3296, 3288, 3280, + 3272, 3264, 3256, 3249, 3241, 3233, 3225, 3218, 3210, 3202, + 3194, 3187, 3179, 3171, 3164, 3156, 3148, 3141, 3133, 3126, + 3118, 3111, 3103, 3095, 3088, 3080, 3073, 3066, 3058, 3051, + 3043, 3036, 3028, 3021, 3014, 3006, 2999, 2992, 2984, 2977, + 2970, 2963, 2955, 2948, 2941, 2934, 2927, 2919, 2912, 2905, + 2898, 2891, 2884, 2877, 2870, 2863, 2856, 2848, 2841, 2834, + 2827, 2820, 2814, 2807, 2800, 2793, 2786, 2779, 2772, 2765, + 2758, 2751, 2745, 2738, 2731, 2724, 2717, 2711, 2704, 2697, + 2690, 2684, 2677, 2670, 2664, 2657, 2650, 2644, 2637, 2630, + 2624, 2617, 2611, 2604, 2597, 2591, 2584, 2578, 2571, 2565, + 2558, 2552, 2545, 2539, 2533, 2526, 2520, 2513, 2507, 2501, + 2494, 2488, 2482, 2475, 2469, 2463, 2456, 2450, 2444, 2437, + 2431, 2425, 2419, 2413, 2406, 2400, 2394, 2388, 2382, 2376, + 2369, 2363, 2357, 2351, 2345, 2339, 2333, 2327, 2321, 2315, + 2309, 2303, 2297, 2291, 2285, 2279, 2273, 2267, 2261, 2255, + 2249, 2243, 2237, 2231, 2226, 2220, 2214, 2208, 2202, 2196, + 2191, 2185, 2179, 2173, 2168, 2162, 2156, 2150, 2145, 2139, + 2133, 2127, 2122, 2116, 2110, 2105, 2099, 2094, 2088, 2082, + 2077, 2071, 2066, 2060, 2054, 2049, 2043, 2038, 2032, 2027, + 2021, 2016, 2010, 2005, 1999, 1994, 1989, 1983, 1978, 1972, + 1967, 1961, 1956, 1951, 1945, 1940, 1935, 1929, 1924, 1919, + 1913, 1908, 1903, 1897, 1892, 1887, 1882, 1876, 1871, 1866, + 1861, 1856, 1850, 1845, 1840, 1835, 1830, 1824, 1819, 1814, + 1809, 1804, 1799, 1794, 1789, 1784, 1778, 1773, 1768, 1763, + 1758, 1753, 1748, 1743, 1738, 1733, 1728, 1723, 1718, 1713, + 1708, 1703, 1698, 1694, 1689, 1684, 1679, 1674, 1669, 1664, + 1659, 1654, 1650, 1645, 1640, 1635, 1630, 1625, 1621, 1616, + 1611, 1606, 1601, 1597, 1592, 1587, 1582, 1578, 1573, 1568, + 1564, 1559, 1554, 1550, 1545, 1540, 1536, 1531, 1526, 1522, + 1517, 1512, 1508, 1503, 1499, 1494, 1489, 1485, 1480, 1476, + 1471, 1467, 1462, 1458, 1453, 1448, 1444, 1439, 1435, 1430, + 1426, 1422, 1417, 1413, 1408, 1404, 1399, 1395, 1390, 1386, + 1382, 1377, 1373, 1368, 1364, 1360, 1355, 1351, 1347, 1342, + 1338, 1334, 1329, 1325, 1321, 1316, 1312, 1308, 1304, 1299, + 1295, 1291, 1287, 1282, 1278, 1274, 1270, 1265, 1261, 1257, + 1253, 1249, 1245, 1240, 1236, 1232, 1228, 1224, 1220, 1215, + 1211, 1207, 1203, 1199, 1195, 1191, 1187, 1183, 1179, 1174, + 1170, 1166, 1162, 1158, 1154, 1150, 1146, 1142, 1138, 1134, + 1130, 1126, 1122, 1118, 1114, 1110, 1106, 1102, 1098, 1095, + 1091, 1087, 1083, 1079, 1075, 1071, 1067, 1063, 1059, 1055, + 1052, 1048, 1044, 1040, 1036, 1032, 1029, 1025, 1021, 1017, + 1013, 1009, 1006, 1002, 998, 994, 991, 987, 983, 979, + 975, 972, 968, 964, 961, 957, 953, 949, 946, 942, + 938, 935, 931, 927, 924, 920, 916, 913, 909, 905, + 902, 898, 894, 891, 887, 884, 880, 876, 873, 869, + 866, 862, 859, 855, 851, 848, 844, 841, 837, 834, + 830, 827, 823, 820, 816, 813, 809, 806, 802, 799, + 795, 792, 788, 785, 781, 778, 774, 771, 768, 764, + 761, 757, 754, 751, 747, 744, 740, 737, 734, 730, + 727, 723, 720, 717, 713, 710, 707, 703, 700, 697, + 693, 690, 687, 684, 680, 677, 674, 670, 667, 664, + 661, 657, 654, 651, 648, 644, 641, 638, 635, 631, + 628, 625, 622, 618, 615, 612, 609, 606, 603, 599, + 596, 593, 590, 587, 584, 580, 577, 574, 571, 568, + 565, 562, 558, 555, 552, 549, 546, 543, 540, 537, + 534, 531, 528, 524, 521, 518, 515, 512, 509, 506, + 503, 500, 497, 494, 491, 488, 485, 482, 479, 476, + 473, 470, 467, 464, 461, 458, 455, 452, 449, 446, + 443, 440, 437, 435, 432, 429, 426, 423, 420, 417, + 414, 411, 408, 405, 402, 400, 397, 394, 391, 388, + 385, 382, 380, 377, 374, 371, 368, 365, 362, 360, + 357, 354, 351, 348, 346, 343, 340, 337, 334, 332, + 329, 326, 323, 320, 318, 315, 312, 309, 307, 304, + 301, 298, 296, 293, 290, 287, 285, 282, 279, 277, + 274, 271, 268, 266, 263, 260, 258, 255, 252, 250, + 247, 244, 242, 239, 236, 234, 231, 228, 226, 223, + 220, 218, 215, 213, 210, 207, 205, 202, 200, 197, + 194, 192, 189, 187, 184, 181, 179, 176, 174, 171, + 169, 166, 163, 161, 158, 156, 153, 151, 148, 146, + 143, 141, 138, 136, 133, 131, 128, 126, 123, 121, + 118, 116, 113, 111, 108, 106, 103, 101, 98, 96, + 93, 91, 88, 86, 84, 81, 79, 76, 74, 71, + 69, 67, 64, 62, 59, 57, 54, 52, 50, 47, + 45, 42, 40, 38, 35, 33, 31, 28, 26, 23, + 21, 19, 16, 14, 12, 9, 7, 5, 2, 0, + 0, -2, -5, -7, -9, -12, -14, -16, -19, -21, + -23, -26, -28, -31, -33, -35, -38, -40, -42, -45, + -47, -50, -52, -54, -57, -59, -62, -64, -67, -69, + -71, -74, -76, -79, -81, -84, -86, -88, -91, -93, + -96, -98, -101, -103, -106, -108, -111, -113, -116, -118, + -121, -123, -126, -128, -131, -133, -136, -138, -141, -143, + -146, -148, -151, -153, -156, -158, -161, -163, -166, -169, + -171, -174, -176, -179, -181, -184, -187, -189, -192, -194, + -197, -200, -202, -205, -207, -210, -213, -215, -218, -220, + -223, -226, -228, -231, -234, -236, -239, -242, -244, -247, + -250, -252, -255, -258, -260, -263, -266, -268, -271, -274, + -277, -279, -282, -285, -287, -290, -293, -296, -298, -301, + -304, -307, -309, -312, -315, -318, -320, -323, -326, -329, + -332, -334, -337, -340, -343, -346, -348, -351, -354, -357, + -360, -362, -365, -368, -371, -374, -377, -380, -382, -385, + -388, -391, -394, -397, -400, -402, -405, -408, -411, -414, + -417, -420, -423, -426, -429, -432, -435, -437, -440, -443, + -446, -449, -452, -455, -458, -461, -464, -467, -470, -473, + -476, -479, -482, -485, -488, -491, -494, -497, -500, -503, + -506, -509, -512, -515, -518, -521, -524, -528, -531, -534, + -537, -540, -543, -546, -549, -552, -555, -558, -562, -565, + -568, -571, -574, -577, -580, -584, -587, -590, -593, -596, + -599, -603, -606, -609, -612, -615, -618, -622, -625, -628, + -631, -635, -638, -641, -644, -648, -651, -654, -657, -661, + -664, -667, -670, -674, -677, -680, -684, -687, -690, -693, + -697, -700, -703, -707, -710, -713, -717, -720, -723, -727, + -730, -734, -737, -740, -744, -747, -751, -754, -757, -761, + -764, -768, -771, -774, -778, -781, -785, -788, -792, -795, + -799, -802, -806, -809, -813, -816, -820, -823, -827, -830, + -834, -837, -841, -844, -848, -851, -855, -859, -862, -866, + -869, -873, -876, -880, -884, -887, -891, -894, -898, -902, + -905, -909, -913, -916, -920, -924, -927, -931, -935, -938, + -942, -946, -949, -953, -957, -961, -964, -968, -972, -975, + -979, -983, -987, -991, -994, -998, -1002, -1006, -1009, -1013, + -1017, -1021, -1025, -1029, -1032, -1036, -1040, -1044, -1048, -1052, + -1055, -1059, -1063, -1067, -1071, -1075, -1079, -1083, -1087, -1091, + -1095, -1098, -1102, -1106, -1110, -1114, -1118, -1122, -1126, -1130, + -1134, -1138, -1142, -1146, -1150, -1154, -1158, -1162, -1166, -1170, + -1174, -1179, -1183, -1187, -1191, -1195, -1199, -1203, -1207, -1211, + -1215, -1220, -1224, -1228, -1232, -1236, -1240, -1245, -1249, -1253, + -1257, -1261, -1265, -1270, -1274, -1278, -1282, -1287, -1291, -1295, + -1299, -1304, -1308, -1312, -1316, -1321, -1325, -1329, -1334, -1338, + -1342, -1347, -1351, -1355, -1360, -1364, -1368, -1373, -1377, -1382, + -1386, -1390, -1395, -1399, -1404, -1408, -1413, -1417, -1422, -1426, + -1430, -1435, -1439, -1444, -1448, -1453, -1458, -1462, -1467, -1471, + -1476, -1480, -1485, -1489, -1494, -1499, -1503, -1508, -1512, -1517, + -1522, -1526, -1531, -1536, -1540, -1545, -1550, -1554, -1559, -1564, + -1568, -1573, -1578, -1582, -1587, -1592, -1597, -1601, -1606, -1611, + -1616, -1621, -1625, -1630, -1635, -1640, -1645, -1650, -1654, -1659, + -1664, -1669, -1674, -1679, -1684, -1689, -1694, -1698, -1703, -1708, + -1713, -1718, -1723, -1728, -1733, -1738, -1743, -1748, -1753, -1758, + -1763, -1768, -1773, -1778, -1784, -1789, -1794, -1799, -1804, -1809, + -1814, -1819, -1824, -1830, -1835, -1840, -1845, -1850, -1856, -1861, + -1866, -1871, -1876, -1882, -1887, -1892, -1897, -1903, -1908, -1913, + -1919, -1924, -1929, -1935, -1940, -1945, -1951, -1956, -1961, -1967, + -1972, -1978, -1983, -1989, -1994, -1999, -2005, -2010, -2016, -2021, + -2027, -2032, -2038, -2043, -2049, -2054, -2060, -2066, -2071, -2077, + -2082, -2088, -2094, -2099, -2105, -2110, -2116, -2122, -2127, -2133, + -2139, -2145, -2150, -2156, -2162, -2168, -2173, -2179, -2185, -2191, + -2196, -2202, -2208, -2214, -2220, -2226, -2231, -2237, -2243, -2249, + -2255, -2261, -2267, -2273, -2279, -2285, -2291, -2297, -2303, -2309, + -2315, -2321, -2327, -2333, -2339, -2345, -2351, -2357, -2363, -2369, + -2376, -2382, -2388, -2394, -2400, -2406, -2413, -2419, -2425, -2431, + -2437, -2444, -2450, -2456, -2463, -2469, -2475, -2482, -2488, -2494, + -2501, -2507, -2513, -2520, -2526, -2533, -2539, -2545, -2552, -2558, + -2565, -2571, -2578, -2584, -2591, -2597, -2604, -2611, -2617, -2624, + -2630, -2637, -2644, -2650, -2657, -2664, -2670, -2677, -2684, -2690, + -2697, -2704, -2711, -2717, -2724, -2731, -2738, -2745, -2751, -2758, + -2765, -2772, -2779, -2786, -2793, -2800, -2807, -2814, -2820, -2827, + -2834, -2841, -2848, -2856, -2863, -2870, -2877, -2884, -2891, -2898, + -2905, -2912, -2919, -2927, -2934, -2941, -2948, -2955, -2963, -2970, + -2977, -2984, -2992, -2999, -3006, -3014, -3021, -3028, -3036, -3043, + -3051, -3058, -3066, -3073, -3080, -3088, -3095, -3103, -3111, -3118, + -3126, -3133, -3141, -3148, -3156, -3164, -3171, -3179, -3187, -3194, + -3202, -3210, -3218, -3225, -3233, -3241, -3249, -3256, -3264, -3272, + -3280, -3288, -3296, -3304, -3312, -3320, -3328, -3336, -3344, -3352, + -3360, -3368, -3376, -3384, -3392, -3400, -3408, -3416, -3424, -3433, + -3441, -3449, -3457, -3465, -3474, -3482, -3490, -3499, -3507, -3515, + -3524, -3532, -3540, -3549, -3557, -3566, -3574, -3583, -3591, -3600, + -3608, -3617, -3625, -3634, -3642, -3651, -3660, -3668, -3677, -3686, + -3694, -3703, -3712, -3721, -3729, -3738, -3747, -3756, -3765, -3774, + -3783, -3791, -3800, -3809, -3818, -3827, -3836, -3845, -3854, -3863, + -3872, -3882, -3891, -3900, -3909, -3918, -3927, -3937, -3946, -3955, + -3964, -3974, -3983, -3992, -4002, -4011, -4020, -4030, -4039, -4049, + -4058, -4068, -4077, -4087, -4096, -4106, -4115, -4125, -4135, -4144, + -4154, -4164, -4173, -4183, -4193, -4203, -4213, -4222, -4232, -4242, + -4252, -4262, -4272, -4282, -4292, -4302, -4312, -4322, -4332, -4342, + -4352, -4362, -4372, -4382, -4393, -4403, -4413, -4423, -4434, -4444, + -4454, -4465, -4475, -4485, -4496, -4506, -4517, -4527, -4538, -4548, + -4559, -4569, -4580, -4591, -4601, -4612, -4623, -4633, -4644, -4655, + -4666, -4676, -4687, -4698, -4709, -4720, -4731, -4742, -4753, -4764, + -4775, -4786, -4797, -4808, -4819, -4830, -4842, -4853, -4864, -4875, + -4887, -4898, -4909, -4921, -4932, -4944, -4955, -4966, -4978, -4989, + -5001, -5013, -5024, -5036, -5047, -5059, -5071, -5083, -5094, -5106, + -5118, -5130, -5142, -5154, -5165, -5177, -5189, -5201, -5213, -5225, + -5238, -5250, -5262, -5274, -5286, -5298, -5311, -5323, -5335, -5348, + -5360, -5372, -5385, -5397, -5410, -5422, -5435, -5447, -5460, -5473, + -5485, -5498, -5511, -5523, -5536, -5549, -5562, -5575, -5588, -5601, + -5614, -5627, -5640, -5653, -5666, -5679, -5692, -5705, -5718, -5732, + -5745, -5758, -5772, -5785, -5798, -5812, -5825, -5839, -5852, -5866, + -5879, -5893, -5907, -5920, -5934, -5948, -5962, -5976, -5989, -6003, + -6017, -6031, -6045, -6059, -6073, -6087, -6102, -6116, -6130, -6144, + -6158, -6173, -6187, -6202, -6216, -6230, -6245, -6259, -6274, -6289, + -6303, -6318, -6333, -6347, -6362, -6377, -6392, -6407, -6421, -6436, + -6451, -6466, -6482, -6497, -6512, -6527, -6542, -6557, -6573, -6588, + -6603, -6619, -6634, -6650, -6665, -6681, -6696, -6712, -6728, -6744, + -6759, -6775, -6791, -6807, -6823, -6839, -6855, -6871, -6887, -6903, + -6919, -6935, -6952, -6968, -6984, -7001, -7017, -7033, -7050, -7066, + -7083, -7100, -7116, -7133, -7150, -7167, -7183, -7200, -7217, -7234, + -7251, -7268, -7285, -7303, -7320, -7337, -7354, -7372, -7389, -7406, + -7424, -7441, -7459, -7477, -7494, -7512, -7530, -7547, -7565, -7583, + -7601, -7619, -7637, -7655, -7673, -7692, -7710, -7728, -7746, -7765, + -7783, -7802, -7820, -7839, -7857, -7876, -7895, -7913, -7932, -7951, + -7970, -7989, -8008, -8027, -8046, -8065, -8084, -8104, -8123, -8142, + -8162, -8181, -8201, -8220, -8240, -8260, -8279, -8299, -8319, -8339, + -8359, -8379, -8399, -8419, -8439, -8460, -8480, -8500, -8521, -8541, + -8562, -8582, -8603, -8624, -8644, -8665, -8686, -8707, -8728, -8749, + -8770, -8791, -8812, -8834, -8855, -8876, -8898, -8919, -8941, -8962, + -8984, -9006, -9028, -9050, -9071, -9093, -9116, -9138, -9160, -9182, + -9204, -9227, -9249, -9272, -9294, -9317, -9340, -9362, -9385, -9408, + -9431, -9454, -9477, -9500, -9523, -9547, -9570, -9593, -9617, -9641, + -9664, -9688, -9712, -9735, -9759, -9783, -9807, -9831, -9856, -9880, + -9904, -9929, -9953, -9977, -10002, -10027, -10052, -10076, -10101, -10126, + -10151, -10176, -10202, -10227, -10252, -10278, -10303, -10329, -10354, -10380, + -10406, -10432, -10458, -10484, -10510, -10536, -10562, -10588, -10615, -10641, + -10668, -10695, -10721, -10748, -10775, -10802, -10829, -10856, -10883, -10911, + -10938, -10966, -10993, -11021, -11048, -11076, -11104, -11132, -11160, -11188, + -11217, -11245, -11273, -11302, -11330, -11359, -11388, -11417, -11446, -11475, + -11504, -11533, -11562, -11592, -11621, -11651, -11680, -11710, -11740, -11770, + -11800, -11830, -11860, -11891, -11921, -11952, -11982, -12013, -12044, -12075, + -12106, -12137, -12168, -12199, -12230, -12262, -12294, -12325, -12357, -12389, + -12421, -12453, -12485, -12518, -12550, -12582, -12615, -12648, -12681, -12714, + -12747, -12780, -12813, -12846, -12880, -12913, -12947, -12981, -13015, -13049, + -13083, -13117, -13152, -13186, -13221, -13255, -13290, -13325, -13360, -13395, + -13431, -13466, -13501, -13537, -13573, -13609, -13645, -13681, -13717, -13753, + -13790, -13826, -13863, -13900, -13937, -13974, -14011, -14048, -14086, -14123, + -14161, -14199, -14237, -14275, -14313, -14352, -14390, -14429, -14467, -14506, + -14545, -14584, -14624, -14663, -14703, -14742, -14782, -14822, -14862, -14902, + -14943, -14983, -15024, -15065, -15106, -15147, -15188, -15229, -15271, -15312, + -15354, -15396, -15438, -15480, -15523, -15565, -15608, -15651, -15694, -15737, + -15780, -15824, -15867, -15911, -15955, -15999, -16043, -16088, -16132, -16177, + -16222, -16267, -16312, -16357, -16403, -16448, -16494, -16540, -16586, -16633, + -16679, -16726, -16773, -16820, -16867, -16914, -16962, -17009, -17057, -17105, + -17153, -17202, -17250, -17299, -17348, -17397, -17446, -17496, -17546, -17595, + -17645, -17696, -17746, -17797, -17847, -17898, -17950, -18001, -18052, -18104, + -18156, -18208, -18261, -18313, -18366, -18419, -18472, -18525, -18579, -18632, + -18686, -18740, -18795, -18849, -18904, -18959, -19014, -19070, -19125, -19181, + -19237, -19293, -19350, -19406, -19463, -19520, -19578, -19635, -19693, -19751, + -19809, -19868, -19927, -19986, -20045, -20104, -20164, -20224, -20284, -20344, + -20405, -20465, -20526, -20588, -20649, -20711, -20773, -20835, -20898, -20961, + -21024, -21087, -21151, -21214, -21278, -21343, -21407, -21472, -21537, -21603, + -21668, -21734, -21800, -21867, -21933, -22000, -22068, -22135, -22203, -22271, + -22339, -22408, -22477, -22546, -22616, -22685, -22756, -22826, -22897, -22968, + -23039, -23110, -23182, -23254, -23327, -23400, -23473, -23546, -23620, -23694, + -23768, -23843, -23918, -23993, -24068, -24144, -24221, -24297, -24374, -24451, + -24529, -24607, -24685, -24763, -24842, -24921, -25001, -25081, -25161, -25242, + -25323, -25404, -25486, -25568, -25650, -25733, -25816, -25900, -25983, -26068, + -26152, -26237, -26323, -26408, -26494, -26581, -26668, -26755, -26843, -26931, + -27019, -27108, -27197, -27287, -27377, -27468, -27558, -27650, -27741, -27833, + -27926, -28019, -28112, -28206, -28300, -28395, -28490, -28586, -28682, -28778, + -28875, -28972, -29070, -29168, -29267, -29366, -29466, -29566, -29666, -29767, + -29869, -29971, -30073, -30176, -30280, -30384, -30488, -30593, -30698, -30804, + -30911, -31018, -31125, -31233, -31341, -31450, -31560, -31670, -31780, -31892, + -32003, -32115, -32228, -32341, -32455, -32570, -32685, -32800, -32916, -33033, + -33150, -33268, -33386, -33505, -33625, -33745, -33866, -33987, -34109, -34232, + -34355, -34479, -34603, -34728, -34854, -34980, -35107, -35235, -35363, -35492, + -35622, -35752, -35883, -36015, -36147, -36280, -36413, -36548, -36683, -36818, + -36955, -37092, -37230, -37368, -37508, -37648, -37788, -37930, -38072, -38215, + -38359, -38503, -38648, -38794, -38941, -39089, -39237, -39386, -39536, -39687, + -39839, -39991, -40144, -40298, -40453, -40609, -40765, -40923, -41081, -41240, + -41400, -41561, -41723, -41886, -42049, -42214, -42379, -42545, -42712, -42881, + -43050, -43220, -43391, -43563, -43735, -43909, -44084, -44260, -44437, -44615, + -44794, -44973, -45154, -45336, -45519, -45703, -45888, -46074, -46262, -46450, + -46639, -46830, -47021, -47214, -47408, -47603, -47799, -47996, -48194, -48394, + -48595, -48797, -49000, -49204, -49410, -49616, -49824, -50034, -50244, -50456, + -50669, -50883, -51099, -51316, -51534, -51754, -51975, -52197, -52421, -52646, + -52872, -53100, -53329, -53560, -53792, -54025, -54260, -54496, -54734, -54974, + -55215, -55457, -55701, -55946, -56193, -56442, -56692, -56944, -57197, -57452, + -57709, -57967, -58227, -58488, -58752, -59016, -59283, -59552, -59822, -60094, + -60367, -60643, -60920, -61199, -61480, -61763, -62048, -62335, -62623, -62914, -64000, +}; diff --git a/software/include/tf_magnet.h b/software/include/tf_magnet.h new file mode 100644 index 0000000..78a885a --- /dev/null +++ b/software/include/tf_magnet.h @@ -0,0 +1,362 @@ +const int tf_magnet[] = { + 0, 8, 15, 23, 31, 39, 46, 54, 62, 70, + 78, 85, 93, 101, 109, 117, 125, 133, 140, 148, + 156, 164, 172, 180, 188, 196, 204, 212, 220, 228, + 236, 244, 252, 260, 268, 276, 284, 292, 300, 308, + 316, 324, 332, 340, 348, 356, 365, 373, 381, 389, + 397, 405, 414, 422, 430, 438, 446, 455, 463, 471, + 479, 488, 496, 504, 512, 521, 529, 537, 546, 554, + 562, 571, 579, 588, 596, 604, 613, 621, 630, 638, + 646, 655, 663, 672, 680, 689, 697, 706, 714, 723, + 731, 740, 749, 757, 766, 774, 783, 792, 800, 809, + 817, 826, 835, 843, 852, 861, 870, 878, 887, 896, + 904, 913, 922, 931, 940, 948, 957, 966, 975, 984, + 992, 1001, 1010, 1019, 1028, 1037, 1046, 1055, 1064, 1073, + 1081, 1090, 1099, 1108, 1117, 1126, 1135, 1144, 1153, 1163, + 1172, 1181, 1190, 1199, 1208, 1217, 1226, 1235, 1244, 1254, + 1263, 1272, 1281, 1290, 1299, 1309, 1318, 1327, 1336, 1346, + 1355, 1364, 1374, 1383, 1392, 1401, 1411, 1420, 1430, 1439, + 1448, 1458, 1467, 1476, 1486, 1495, 1505, 1514, 1524, 1533, + 1543, 1552, 1562, 1571, 1581, 1590, 1600, 1610, 1619, 1629, + 1638, 1648, 1658, 1667, 1677, 1687, 1696, 1706, 1716, 1725, + 1735, 1745, 1754, 1764, 1774, 1784, 1794, 1803, 1813, 1823, + 1833, 1843, 1853, 1862, 1872, 1882, 1892, 1902, 1912, 1922, + 1932, 1942, 1952, 1962, 1972, 1982, 1992, 2002, 2012, 2022, + 2032, 2042, 2052, 2063, 2073, 2083, 2093, 2103, 2113, 2124, + 2134, 2144, 2154, 2164, 2175, 2185, 2195, 2206, 2216, 2226, + 2237, 2247, 2257, 2268, 2278, 2288, 2299, 2309, 2320, 2330, + 2341, 2351, 2361, 2372, 2383, 2393, 2404, 2414, 2425, 2435, + 2446, 2456, 2467, 2478, 2488, 2499, 2510, 2520, 2531, 2542, + 2552, 2563, 2574, 2585, 2595, 2606, 2617, 2628, 2639, 2650, + 2660, 2671, 2682, 2693, 2704, 2715, 2726, 2737, 2748, 2759, + 2770, 2781, 2792, 2803, 2814, 2825, 2836, 2847, 2858, 2869, + 2880, 2892, 2903, 2914, 2925, 2936, 2947, 2959, 2970, 2981, + 2992, 3004, 3015, 3026, 3038, 3049, 3060, 3072, 3083, 3095, + 3106, 3117, 3129, 3140, 3152, 3163, 3175, 3186, 3198, 3209, + 3221, 3232, 3244, 3256, 3267, 3279, 3291, 3302, 3314, 3326, + 3337, 3349, 3361, 3373, 3384, 3396, 3408, 3420, 3432, 3443, + 3455, 3467, 3479, 3491, 3503, 3515, 3527, 3539, 3551, 3563, + 3575, 3587, 3599, 3611, 3623, 3635, 3647, 3659, 3671, 3683, + 3696, 3708, 3720, 3732, 3744, 3757, 3769, 3781, 3794, 3806, + 3818, 3831, 3843, 3855, 3868, 3880, 3893, 3905, 3917, 3930, + 3942, 3955, 3967, 3980, 3993, 4005, 4018, 4030, 4043, 4056, + 4068, 4081, 4094, 4106, 4119, 4132, 4144, 4157, 4170, 4183, + 4196, 4208, 4221, 4234, 4247, 4260, 4273, 4286, 4299, 4312, + 4325, 4338, 4351, 4364, 4377, 4390, 4403, 4416, 4429, 4442, + 4456, 4469, 4482, 4495, 4508, 4522, 4535, 4548, 4562, 4575, + 4588, 4602, 4615, 4628, 4642, 4655, 4669, 4682, 4696, 4709, + 4723, 4736, 4750, 4763, 4777, 4791, 4804, 4818, 4831, 4845, + 4859, 4873, 4886, 4900, 4914, 4928, 4941, 4955, 4969, 4983, + 4997, 5011, 5025, 5039, 5053, 5067, 5081, 5095, 5109, 5123, + 5137, 5151, 5165, 5179, 5193, 5208, 5222, 5236, 5250, 5264, + 5279, 5293, 5307, 5322, 5336, 5350, 5365, 5379, 5394, 5408, + 5422, 5437, 5451, 5466, 5481, 5495, 5510, 5524, 5539, 5554, + 5568, 5583, 5598, 5612, 5627, 5642, 5657, 5672, 5686, 5701, + 5716, 5731, 5746, 5761, 5776, 5791, 5806, 5821, 5836, 5851, + 5866, 5881, 5896, 5911, 5926, 5942, 5957, 5972, 5987, 6003, + 6018, 6033, 6049, 6064, 6079, 6095, 6110, 6126, 6141, 6156, + 6172, 6188, 6203, 6219, 6234, 6250, 6265, 6281, 6297, 6313, + 6328, 6344, 6360, 6376, 6391, 6407, 6423, 6439, 6455, 6471, + 6487, 6503, 6519, 6535, 6551, 6567, 6583, 6599, 6615, 6631, + 6647, 6664, 6680, 6696, 6712, 6729, 6745, 6761, 6778, 6794, + 6811, 6827, 6843, 6860, 6876, 6893, 6909, 6926, 6943, 6959, + 6976, 6993, 7009, 7026, 7043, 7060, 7076, 7093, 7110, 7127, + 7144, 7161, 7178, 7195, 7212, 7229, 7246, 7263, 7280, 7297, + 7314, 7331, 7348, 7366, 7383, 7400, 7417, 7435, 7452, 7469, + 7487, 7504, 7522, 7539, 7556, 7574, 7592, 7609, 7627, 7644, + 7662, 7680, 7697, 7715, 7733, 7751, 7768, 7786, 7804, 7822, + 7840, 7858, 7876, 7894, 7912, 7930, 7948, 7966, 7984, 8002, + 8020, 8038, 8057, 8075, 8093, 8112, 8130, 8148, 8167, 8185, + 8203, 8222, 8240, 8259, 8277, 8296, 8315, 8333, 8352, 8371, + 8389, 8408, 8427, 8446, 8464, 8483, 8502, 8521, 8540, 8559, + 8578, 8597, 8616, 8635, 8654, 8673, 8693, 8712, 8731, 8750, + 8770, 8789, 8808, 8828, 8847, 8866, 8886, 8905, 8925, 8945, + 8964, 8984, 9003, 9023, 9043, 9062, 9082, 9102, 9122, 9142, + 9162, 9181, 9201, 9221, 9241, 9261, 9281, 9302, 9322, 9342, + 9362, 9382, 9402, 9423, 9443, 9463, 9484, 9504, 9525, 9545, + 9566, 9586, 9607, 9627, 9648, 9669, 9689, 9710, 9731, 9752, + 9772, 9793, 9814, 9835, 9856, 9877, 9898, 9919, 9940, 9961, + 9982, 10003, 10025, 10046, 10067, 10088, 10110, 10131, 10153, 10174, + 10196, 10217, 10239, 10260, 10282, 10303, 10325, 10347, 10369, 10390, + 10412, 10434, 10456, 10478, 10500, 10522, 10544, 10566, 10588, 10610, + 10632, 10654, 10677, 10699, 10721, 10743, 10766, 10788, 10811, 10833, + 10856, 10878, 10901, 10923, 10946, 10969, 10992, 11014, 11037, 11060, + 11083, 11106, 11129, 11152, 11175, 11198, 11221, 11244, 11267, 11290, + 11314, 11337, 11360, 11384, 11407, 11430, 11454, 11477, 11501, 11525, + 11548, 11572, 11595, 11619, 11643, 11667, 11691, 11715, 11738, 11762, + 11786, 11811, 11835, 11859, 11883, 11907, 11931, 11956, 11980, 12004, + 12029, 12053, 12078, 12102, 12127, 12151, 12176, 12201, 12225, 12250, + 12275, 12300, 12325, 12350, 12375, 12400, 12425, 12450, 12475, 12500, + 12525, 12550, 12576, 12601, 12626, 12652, 12677, 12703, 12728, 12754, + 12780, 12805, 12831, 12857, 12883, 12908, 12934, 12960, 12986, 13012, + 13038, 13064, 13091, 13117, 13143, 13169, 13196, 13222, 13248, 13275, + 13301, 13328, 13355, 13381, 13408, 13435, 13461, 13488, 13515, 13542, + 13569, 13596, 13623, 13650, 13677, 13704, 13732, 13759, 13786, 13814, + 13841, 13868, 13896, 13924, 13951, 13979, 14006, 14034, 14062, 14090, + 14118, 14146, 14174, 14202, 14230, 14258, 14286, 14314, 14343, 14371, + 14399, 14428, 14456, 14485, 14513, 14542, 14570, 14599, 14628, 14657, + 14686, 14714, 14743, 14772, 14801, 14831, 14860, 14889, 14918, 14948, + 14977, 15006, 15036, 15065, 15095, 15124, 15154, 15184, 15214, 15243, + 15273, 15303, 15333, 15363, 15393, 15423, 15454, 15484, 15514, 15545, + 15575, 15605, 15636, 15666, 15697, 15728, 15759, 15789, 15820, 15851, + 15882, 15913, 15944, 15975, 16006, 16037, 16069, 16100, 16131, 16163, + 16194, 16226, 16258, 16289, 16321, 16353, 16385, 16416, 16448, 16480, + 16512, 16545, 16577, 16609, 16641, 16674, 16706, 16739, 16771, 16804, + 16836, 16869, 16902, 16935, 16967, 17000, 17033, 17066, 17100, 17133, + 17166, 17199, 17233, 17266, 17300, 17333, 17367, 17400, 17434, 17468, + 17502, 17536, 17570, 17604, 17638, 17672, 17706, 17740, 17775, 17809, + 17844, 17878, 17913, 17947, 17982, 18017, 18052, 18087, 18122, 18157, + 18192, 18227, 18262, 18297, 18333, 18368, 18404, 18439, 18475, 18511, + 18546, 18582, 18618, 18654, 18690, 18726, 18762, 18799, 18835, 18871, + 18908, 18944, 18981, 19017, 19054, 19091, 19128, 19165, 19202, 19239, + 19276, 19313, 19350, 19388, 19425, 19462, 19500, 19538, 19575, 19613, + 19651, 19689, 19727, 19765, 19803, 19841, 19879, 19918, 19956, 19994, + 20033, 20072, 20110, 20149, 20188, 20227, 20266, 20305, 20344, 20383, + 20423, 20462, 20501, 20541, 20580, 20620, 20660, 20700, 20740, 20780, + 20820, 20860, 20900, 20940, 20981, 21021, 21062, 21102, 21143, 21184, + 21224, 21265, 21306, 21347, 21389, 21430, 21471, 21512, 21554, 21596, + 21637, 21679, 21721, 21763, 21804, 21847, 21889, 21931, 21973, 22016, + 22058, 22101, 22143, 22186, 22229, 22272, 22314, 22358, 22401, 22444, + 22487, 22531, 22574, 22618, 22661, 22705, 22749, 22793, 22837, 22881, + 22925, 22969, 23013, 23058, 23102, 23147, 23192, 23237, 23281, 23326, + 23371, 23417, 23462, 23507, 23553, 23598, 23644, 23689, 23735, 23781, + 23827, 23873, 23919, 23965, 24012, 24058, 24105, 24151, 24198, 24245, + 24292, 24339, 24386, 24433, 24480, 24528, 24575, 24623, 24671, 24718, + 24766, 24814, 24862, 24910, 24959, 25007, 25055, 25104, 25153, 25201, + 25250, 25299, 25348, 25398, 25447, 25496, 25546, 25595, 25645, 25695, + 25745, 25795, 25845, 25895, 25945, 25996, 26046, 26097, 26147, 26198, + 26249, 26300, 26351, 26403, 26454, 26505, 26557, 26609, 26660, 26712, + 26764, 26816, 26869, 26921, 26973, 27026, 27079, 27131, 27184, 27237, + 27290, 27344, 27397, 27450, 27504, 27558, 27612, 27665, 27719, 27774, + 27828, 27882, 27937, 27991, 28046, 28101, 28156, 28211, 28266, 28321, + 28377, 28432, 28488, 28544, 28600, 28656, 28712, 28768, 28824, 28881, + 28938, 28994, 29051, 29108, 29165, 29223, 29280, 29337, 29395, 29453, + 29511, 29569, 29627, 29685, 29743, 29802, 29861, 29919, 29978, 30037, + 30096, 30156, 30215, 30275, 30334, 30394, 30454, 30514, 30574, 30635, + 30695, 30756, 30816, 30877, 30938, 30999, 31061, 31122, 31184, 31245, + 31307, 31369, 31431, 31493, 31556, 31618, 31681, 31744, 31807, 31870, + 31933, 31996, 32060, 32123, 32187, 32251, 32315, 32379, 32444, 32508, + 32573, 32638, 32703, 32768, 32833, 32898, 32964, 33030, 33096, 33161, + 33228, 33294, 33360, 33427, 33494, 33561, 33628, 33695, 33762, 33830, + 33897, 33965, 34033, 34101, 34170, 34238, 34307, 34375, 34444, 34513, + 34583, 34652, 34721, 34791, 34861, 34931, 35001, 35072, 35142, 35213, + 35284, 35355, 35426, 35497, 35569, 35641, 35712, 35784, 35857, 35929, + 36002, 36074, 36147, 36220, 36293, 36367, 36440, 36514, 36588, 36662, + 36736, 36811, 36885, 36960, 37035, 37110, 37186, 37261, 37337, 37413, + 37489, 37565, 37641, 37718, 37795, 37872, 37949, 38026, 38104, 38181, + 38259, 38337, 38416, 38494, 38573, 38652, 38731, 38810, 38889, 38969, + 39049, 39129, 39209, 39289, 39370, 39450, 39531, 39613, 39694, 39775, + 39857, 39939, 40021, 40104, 40186, 40269, 40352, 40435, 40518, 40602, + 40686, 40770, 40854, 40938, 41023, 41108, 41193, 41278, 41364, 41449, + 41535, 41621, 41707, 41794, 41881, 41968, 42055, 42142, 42230, 42318, + 42406, 42494, 42582, 42671, 42760, 42849, 42939, 43028, 43118, 43208, + 43298, 43389, 43480, 43571, 43662, 43753, 43845, 43937, 44029, 44121, + 44214, 44307, 44400, 44493, 44587, 44680, 44774, 44869, 44963, 45058, + 45153, 45248, 45344, 45439, 45535, 45632, 45728, 45825, 45922, 46019, + 46117, 46214, 46312, 46411, 46509, 46608, 46707, 46806, 46906, 47005, + 47105, 47206, 47306, 47407, 47508, 47610, 47711, 47813, 47915, 48018, + 48120, 48223, 48327, 48430, 48534, 48638, 48742, 48847, 48952, 49057, + 49162, 49268, 49374, 49481, 49587, 49694, 49801, 49909, 50016, 50124, + 50233, 50341, 50450, 50559, 50669, 50779, 50889, 50999, 51110, 51221, + 51332, 51443, 51555, 51667, 51780, 51893, 52006, 52119, 52233, 52347, + 52461, 52576, 52691, 52806, 52922, 53038, 53154, 53270, 53387, 53504, + 53622, 53740, 53858, 53976, 54095, 54214, 54334, 54454, 54574, 54694, + 54815, 54936, 55058, 55180, 55302, 55424, 55547, 55670, 55794, 55918, + 56042, 56166, 56291, 56417, 56542, 56668, 56795, 56921, 57048, 57176, + 57304, 57432, 57560, 57689, 57818, 57948, 58078, 58208, 58339, 58470, + 58602, 58733, 58866, 58998, 59131, 59265, 59398, 59533, 59667, 59802, + 59937, 60073, 60209, 60346, 60482, 60620, 60757, 60895, 61034, 61173, + 61312, 61452, 61592, 61732, 61873, 62015, 62156, 62299, 62441, 62584, + 62728, 62871, 63016, 63160, 63306, 63451, 63597, 63743, 63890, 64038, + 64185, 64334, 64482, 64631, 64781, 64931, 65081, 65232, 65383, 65535, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -65535, -65383, -65232, -65081, -64931, -64781, -64631, -64482, -64334, -64185, + -64038, -63890, -63743, -63597, -63451, -63306, -63160, -63016, -62871, -62728, + -62584, -62441, -62299, -62156, -62015, -61873, -61732, -61592, -61452, -61312, + -61173, -61034, -60895, -60757, -60620, -60482, -60346, -60209, -60073, -59937, + -59802, -59667, -59533, -59398, -59265, -59131, -58998, -58866, -58733, -58602, + -58470, -58339, -58208, -58078, -57948, -57818, -57689, -57560, -57432, -57304, + -57176, -57048, -56921, -56795, -56668, -56542, -56417, -56291, -56166, -56042, + -55918, -55794, -55670, -55547, -55424, -55302, -55180, -55058, -54936, -54815, + -54694, -54574, -54454, -54334, -54214, -54095, -53976, -53858, -53740, -53622, + -53504, -53387, -53270, -53154, -53038, -52922, -52806, -52691, -52576, -52461, + -52347, -52233, -52119, -52006, -51893, -51780, -51667, -51555, -51443, -51332, + -51221, -51110, -50999, -50889, -50779, -50669, -50559, -50450, -50341, -50233, + -50124, -50016, -49909, -49801, -49694, -49587, -49481, -49374, -49268, -49162, + -49057, -48952, -48847, -48742, -48638, -48534, -48430, -48327, -48223, -48120, + -48018, -47915, -47813, -47711, -47610, -47508, -47407, -47306, -47206, -47105, + -47005, -46906, -46806, -46707, -46608, -46509, -46411, -46312, -46214, -46117, + -46019, -45922, -45825, -45728, -45632, -45535, -45439, -45344, -45248, -45153, + -45058, -44963, -44869, -44774, -44680, -44587, -44493, -44400, -44307, -44214, + -44121, -44029, -43937, -43845, -43753, -43662, -43571, -43480, -43389, -43298, + -43208, -43118, -43028, -42939, -42849, -42760, -42671, -42582, -42494, -42406, + -42318, -42230, -42142, -42055, -41968, -41881, -41794, -41707, -41621, -41535, + -41449, -41364, -41278, -41193, -41108, -41023, -40938, -40854, -40770, -40686, + -40602, -40518, -40435, -40352, -40269, -40186, -40104, -40021, -39939, -39857, + -39775, -39694, -39613, -39531, -39450, -39370, -39289, -39209, -39129, -39049, + -38969, -38889, -38810, -38731, -38652, -38573, -38494, -38416, -38337, -38259, + -38181, -38104, -38026, -37949, -37872, -37795, -37718, -37641, -37565, -37489, + -37413, -37337, -37261, -37186, -37110, -37035, -36960, -36885, -36811, -36736, + -36662, -36588, -36514, -36440, -36367, -36293, -36220, -36147, -36074, -36002, + -35929, -35857, -35784, -35712, -35641, -35569, -35497, -35426, -35355, -35284, + -35213, -35142, -35072, -35001, -34931, -34861, -34791, -34721, -34652, -34583, + -34513, -34444, -34375, -34307, -34238, -34170, -34101, -34033, -33965, -33897, + -33830, -33762, -33695, -33628, -33561, -33494, -33427, -33360, -33294, -33228, + -33161, -33096, -33030, -32964, -32898, -32833, -32768, -32703, -32638, -32573, + -32508, -32444, -32379, -32315, -32251, -32187, -32123, -32060, -31996, -31933, + -31870, -31807, -31744, -31681, -31618, -31556, -31493, -31431, -31369, -31307, + -31245, -31184, -31122, -31061, -30999, -30938, -30877, -30816, -30756, -30695, + -30635, -30574, -30514, -30454, -30394, -30334, -30275, -30215, -30156, -30096, + -30037, -29978, -29919, -29861, -29802, -29743, -29685, -29627, -29569, -29511, + -29453, -29395, -29337, -29280, -29223, -29165, -29108, -29051, -28994, -28938, + -28881, -28824, -28768, -28712, -28656, -28600, -28544, -28488, -28432, -28377, + -28321, -28266, -28211, -28156, -28101, -28046, -27991, -27937, -27882, -27828, + -27774, -27719, -27665, -27612, -27558, -27504, -27450, -27397, -27344, -27290, + -27237, -27184, -27131, -27079, -27026, -26973, -26921, -26869, -26816, -26764, + -26712, -26660, -26609, -26557, -26505, -26454, -26403, -26351, -26300, -26249, + -26198, -26147, -26097, -26046, -25996, -25945, -25895, -25845, -25795, -25745, + -25695, -25645, -25595, -25546, -25496, -25447, -25398, -25348, -25299, -25250, + -25201, -25153, -25104, -25055, -25007, -24959, -24910, -24862, -24814, -24766, + -24718, -24671, -24623, -24575, -24528, -24480, -24433, -24386, -24339, -24292, + -24245, -24198, -24151, -24105, -24058, -24012, -23965, -23919, -23873, -23827, + -23781, -23735, -23689, -23644, -23598, -23553, -23507, -23462, -23417, -23371, + -23326, -23281, -23237, -23192, -23147, -23102, -23058, -23013, -22969, -22925, + -22881, -22837, -22793, -22749, -22705, -22661, -22618, -22574, -22531, -22487, + -22444, -22401, -22358, -22314, -22272, -22229, -22186, -22143, -22101, -22058, + -22016, -21973, -21931, -21889, -21847, -21804, -21763, -21721, -21679, -21637, + -21596, -21554, -21512, -21471, -21430, -21389, -21347, -21306, -21265, -21224, + -21184, -21143, -21102, -21062, -21021, -20981, -20940, -20900, -20860, -20820, + -20780, -20740, -20700, -20660, -20620, -20580, -20541, -20501, -20462, -20423, + -20383, -20344, -20305, -20266, -20227, -20188, -20149, -20110, -20072, -20033, + -19994, -19956, -19918, -19879, -19841, -19803, -19765, -19727, -19689, -19651, + -19613, -19575, -19538, -19500, -19462, -19425, -19388, -19350, -19313, -19276, + -19239, -19202, -19165, -19128, -19091, -19054, -19017, -18981, -18944, -18908, + -18871, -18835, -18799, -18762, -18726, -18690, -18654, -18618, -18582, -18546, + -18511, -18475, -18439, -18404, -18368, -18333, -18297, -18262, -18227, -18192, + -18157, -18122, -18087, -18052, -18017, -17982, -17947, -17913, -17878, -17844, + -17809, -17775, -17740, -17706, -17672, -17638, -17604, -17570, -17536, -17502, + -17468, -17434, -17400, -17367, -17333, -17300, -17266, -17233, -17199, -17166, + -17133, -17100, -17066, -17033, -17000, -16967, -16935, -16902, -16869, -16836, + -16804, -16771, -16739, -16706, -16674, -16641, -16609, -16577, -16545, -16512, + -16480, -16448, -16416, -16385, -16353, -16321, -16289, -16258, -16226, -16194, + -16163, -16131, -16100, -16069, -16037, -16006, -15975, -15944, -15913, -15882, + -15851, -15820, -15789, -15759, -15728, -15697, -15666, -15636, -15605, -15575, + -15545, -15514, -15484, -15454, -15423, -15393, -15363, -15333, -15303, -15273, + -15243, -15214, -15184, -15154, -15124, -15095, -15065, -15036, -15006, -14977, + -14948, -14918, -14889, -14860, -14831, -14801, -14772, -14743, -14714, -14686, + -14657, -14628, -14599, -14570, -14542, -14513, -14485, -14456, -14428, -14399, + -14371, -14343, -14314, -14286, -14258, -14230, -14202, -14174, -14146, -14118, + -14090, -14062, -14034, -14006, -13979, -13951, -13924, -13896, -13868, -13841, + -13814, -13786, -13759, -13732, -13704, -13677, -13650, -13623, -13596, -13569, + -13542, -13515, -13488, -13461, -13435, -13408, -13381, -13355, -13328, -13301, + -13275, -13248, -13222, -13196, -13169, -13143, -13117, -13091, -13064, -13038, + -13012, -12986, -12960, -12934, -12908, -12883, -12857, -12831, -12805, -12780, + -12754, -12728, -12703, -12677, -12652, -12626, -12601, -12576, -12550, -12525, + -12500, -12475, -12450, -12425, -12400, -12375, -12350, -12325, -12300, -12275, + -12250, -12225, -12201, -12176, -12151, -12127, -12102, -12078, -12053, -12029, + -12004, -11980, -11956, -11931, -11907, -11883, -11859, -11835, -11811, -11786, + -11762, -11738, -11715, -11691, -11667, -11643, -11619, -11595, -11572, -11548, + -11525, -11501, -11477, -11454, -11430, -11407, -11384, -11360, -11337, -11314, + -11290, -11267, -11244, -11221, -11198, -11175, -11152, -11129, -11106, -11083, + -11060, -11037, -11014, -10992, -10969, -10946, -10923, -10901, -10878, -10856, + -10833, -10811, -10788, -10766, -10743, -10721, -10699, -10677, -10654, -10632, + -10610, -10588, -10566, -10544, -10522, -10500, -10478, -10456, -10434, -10412, + -10390, -10369, -10347, -10325, -10303, -10282, -10260, -10239, -10217, -10196, + -10174, -10153, -10131, -10110, -10088, -10067, -10046, -10025, -10003, -9982, + -9961, -9940, -9919, -9898, -9877, -9856, -9835, -9814, -9793, -9772, + -9752, -9731, -9710, -9689, -9669, -9648, -9627, -9607, -9586, -9566, + -9545, -9525, -9504, -9484, -9463, -9443, -9423, -9402, -9382, -9362, + -9342, -9322, -9302, -9281, -9261, -9241, -9221, -9201, -9181, -9162, + -9142, -9122, -9102, -9082, -9062, -9043, -9023, -9003, -8984, -8964, + -8945, -8925, -8905, -8886, -8866, -8847, -8828, -8808, -8789, -8770, + -8750, -8731, -8712, -8693, -8673, -8654, -8635, -8616, -8597, -8578, + -8559, -8540, -8521, -8502, -8483, -8464, -8446, -8427, -8408, -8389, + -8371, -8352, -8333, -8315, -8296, -8277, -8259, -8240, -8222, -8203, + -8185, -8167, -8148, -8130, -8112, -8093, -8075, -8057, -8038, -8020, + -8002, -7984, -7966, -7948, -7930, -7912, -7894, -7876, -7858, -7840, + -7822, -7804, -7786, -7768, -7751, -7733, -7715, -7697, -7680, -7662, + -7644, -7627, -7609, -7592, -7574, -7556, -7539, -7522, -7504, -7487, + -7469, -7452, -7435, -7417, -7400, -7383, -7366, -7348, -7331, -7314, + -7297, -7280, -7263, -7246, -7229, -7212, -7195, -7178, -7161, -7144, + -7127, -7110, -7093, -7076, -7060, -7043, -7026, -7009, -6993, -6976, + -6959, -6943, -6926, -6909, -6893, -6876, -6860, -6843, -6827, -6811, + -6794, -6778, -6761, -6745, -6729, -6712, -6696, -6680, -6664, -6647, + -6631, -6615, -6599, -6583, -6567, -6551, -6535, -6519, -6503, -6487, + -6471, -6455, -6439, -6423, -6407, -6391, -6376, -6360, -6344, -6328, + -6313, -6297, -6281, -6265, -6250, -6234, -6219, -6203, -6188, -6172, + -6156, -6141, -6126, -6110, -6095, -6079, -6064, -6049, -6033, -6018, + -6003, -5987, -5972, -5957, -5942, -5926, -5911, -5896, -5881, -5866, + -5851, -5836, -5821, -5806, -5791, -5776, -5761, -5746, -5731, -5716, + -5701, -5686, -5672, -5657, -5642, -5627, -5612, -5598, -5583, -5568, + -5554, -5539, -5524, -5510, -5495, -5481, -5466, -5451, -5437, -5422, + -5408, -5394, -5379, -5365, -5350, -5336, -5322, -5307, -5293, -5279, + -5264, -5250, -5236, -5222, -5208, -5193, -5179, -5165, -5151, -5137, + -5123, -5109, -5095, -5081, -5067, -5053, -5039, -5025, -5011, -4997, + -4983, -4969, -4955, -4941, -4928, -4914, -4900, -4886, -4873, -4859, + -4845, -4831, -4818, -4804, -4791, -4777, -4763, -4750, -4736, -4723, + -4709, -4696, -4682, -4669, -4655, -4642, -4628, -4615, -4602, -4588, + -4575, -4562, -4548, -4535, -4522, -4508, -4495, -4482, -4469, -4456, + -4442, -4429, -4416, -4403, -4390, -4377, -4364, -4351, -4338, -4325, + -4312, -4299, -4286, -4273, -4260, -4247, -4234, -4221, -4208, -4196, + -4183, -4170, -4157, -4144, -4132, -4119, -4106, -4094, -4081, -4068, + -4056, -4043, -4030, -4018, -4005, -3993, -3980, -3967, -3955, -3942, + -3930, -3917, -3905, -3893, -3880, -3868, -3855, -3843, -3831, -3818, + -3806, -3794, -3781, -3769, -3757, -3744, -3732, -3720, -3708, -3696, + -3683, -3671, -3659, -3647, -3635, -3623, -3611, -3599, -3587, -3575, + -3563, -3551, -3539, -3527, -3515, -3503, -3491, -3479, -3467, -3455, + -3443, -3432, -3420, -3408, -3396, -3384, -3373, -3361, -3349, -3337, + -3326, -3314, -3302, -3291, -3279, -3267, -3256, -3244, -3232, -3221, + -3209, -3198, -3186, -3175, -3163, -3152, -3140, -3129, -3117, -3106, + -3095, -3083, -3072, -3060, -3049, -3038, -3026, -3015, -3004, -2992, + -2981, -2970, -2959, -2947, -2936, -2925, -2914, -2903, -2892, -2880, + -2869, -2858, -2847, -2836, -2825, -2814, -2803, -2792, -2781, -2770, + -2759, -2748, -2737, -2726, -2715, -2704, -2693, -2682, -2671, -2660, + -2650, -2639, -2628, -2617, -2606, -2595, -2585, -2574, -2563, -2552, + -2542, -2531, -2520, -2510, -2499, -2488, -2478, -2467, -2456, -2446, + -2435, -2425, -2414, -2404, -2393, -2383, -2372, -2361, -2351, -2341, + -2330, -2320, -2309, -2299, -2288, -2278, -2268, -2257, -2247, -2237, + -2226, -2216, -2206, -2195, -2185, -2175, -2164, -2154, -2144, -2134, + -2124, -2113, -2103, -2093, -2083, -2073, -2063, -2052, -2042, -2032, + -2022, -2012, -2002, -1992, -1982, -1972, -1962, -1952, -1942, -1932, + -1922, -1912, -1902, -1892, -1882, -1872, -1862, -1853, -1843, -1833, + -1823, -1813, -1803, -1794, -1784, -1774, -1764, -1754, -1745, -1735, + -1725, -1716, -1706, -1696, -1687, -1677, -1667, -1658, -1648, -1638, + -1629, -1619, -1610, -1600, -1590, -1581, -1571, -1562, -1552, -1543, + -1533, -1524, -1514, -1505, -1495, -1486, -1476, -1467, -1458, -1448, + -1439, -1430, -1420, -1411, -1401, -1392, -1383, -1374, -1364, -1355, + -1346, -1336, -1327, -1318, -1309, -1299, -1290, -1281, -1272, -1263, + -1254, -1244, -1235, -1226, -1217, -1208, -1199, -1190, -1181, -1172, + -1163, -1153, -1144, -1135, -1126, -1117, -1108, -1099, -1090, -1081, + -1073, -1064, -1055, -1046, -1037, -1028, -1019, -1010, -1001, -992, + -984, -975, -966, -957, -948, -940, -931, -922, -913, -904, + -896, -887, -878, -870, -861, -852, -843, -835, -826, -817, + -809, -800, -792, -783, -774, -766, -757, -749, -740, -731, + -723, -714, -706, -697, -689, -680, -672, -663, -655, -646, + -638, -630, -621, -613, -604, -596, -588, -579, -571, -562, + -554, -546, -537, -529, -521, -512, -504, -496, -488, -479, + -471, -463, -455, -446, -438, -430, -422, -414, -405, -397, + -389, -381, -373, -365, -356, -348, -340, -332, -324, -316, + -308, -300, -292, -284, -276, -268, -260, -252, -244, -236, + -228, -220, -212, -204, -196, -188, -180, -172, -164, -156, + -148, -140, -133, -125, -117, -109, -101, -93, -85, -78, + -70, -62, -54, -46, -39, -31, -23, -15, -8, 0, +}; diff --git a/software/include/tf_sin.h b/software/include/tf_sin.h new file mode 100644 index 0000000..6912732 --- /dev/null +++ b/software/include/tf_sin.h @@ -0,0 +1,362 @@ +const int tf_sin[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, + 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, + 6, 6, 6, 6, 7, 7, 7, 8, 8, 8, + 8, 9, 9, 9, 10, 10, 11, 11, 11, 12, + 12, 13, 13, 14, 14, 15, 15, 16, 17, 17, + 18, 18, 19, 20, 20, 21, 22, 23, 24, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 38, 39, 40, 41, 43, 44, 46, 47, + 49, 50, 52, 53, 55, 57, 58, 60, 62, 64, + 66, 68, 70, 72, 74, 77, 79, 81, 84, 86, + 89, 91, 94, 97, 99, 102, 105, 108, 111, 114, + 118, 121, 124, 128, 131, 135, 139, 143, 147, 151, + 155, 159, 163, 167, 172, 177, 181, 186, 191, 196, + 201, 206, 212, 217, 223, 228, 234, 240, 246, 253, + 259, 265, 272, 279, 286, 293, 300, 307, 315, 323, + 330, 338, 347, 355, 363, 372, 381, 390, 399, 408, + 418, 428, 438, 448, 458, 469, 479, 490, 501, 513, + 524, 536, 548, 560, 573, 585, 598, 612, 625, 639, + 652, 667, 681, 696, 711, 726, 741, 757, 773, 789, + 806, 823, 840, 857, 875, 893, 911, 930, 949, 968, + 988, 1008, 1028, 1048, 1069, 1091, 1112, 1134, 1157, 1179, + 1202, 1226, 1249, 1274, 1298, 1323, 1348, 1374, 1400, 1427, + 1454, 1481, 1509, 1537, 1565, 1594, 1624, 1654, 1684, 1715, + 1746, 1778, 1810, 1842, 1875, 1909, 1943, 1977, 2012, 2048, + 2084, 2120, 2157, 2195, 2233, 2272, 2311, 2350, 2390, 2431, + 2472, 2514, 2557, 2599, 2643, 2687, 2732, 2777, 2823, 2869, + 2916, 2964, 3012, 3061, 3110, 3160, 3211, 3262, 3314, 3367, + 3420, 3474, 3528, 3584, 3639, 3696, 3753, 3811, 3870, 3929, + 3989, 4050, 4111, 4173, 4236, 4299, 4363, 4428, 4494, 4561, + 4628, 4696, 4764, 4834, 4904, 4975, 5046, 5119, 5192, 5266, + 5341, 5417, 5493, 5570, 5648, 5727, 5807, 5887, 5968, 6051, + 6133, 6217, 6302, 6387, 6474, 6561, 6649, 6737, 6827, 6918, + 7009, 7101, 7195, 7289, 7383, 7479, 7576, 7674, 7772, 7871, + 7972, 8073, 8175, 8278, 8382, 8487, 8592, 8699, 8806, 8915, + 9024, 9135, 9246, 9358, 9471, 9585, 9700, 9816, 9933, 10051, + 10170, 10290, 10410, 10532, 10655, 10778, 10903, 11028, 11155, 11282, + 11410, 11540, 11670, 11801, 11933, 12067, 12201, 12336, 12472, 12609, + 12747, 12886, 13026, 13167, 13309, 13451, 13595, 13740, 13886, 14032, + 14180, 14329, 14478, 14629, 14780, 14933, 15086, 15240, 15396, 15552, + 15709, 15867, 16026, 16186, 16347, 16509, 16672, 16836, 17000, 17166, + 17332, 17500, 17668, 17838, 18008, 18179, 18351, 18524, 18698, 18872, + 19048, 19224, 19402, 19580, 19759, 19939, 20120, 20301, 20484, 20667, + 20851, 21036, 21222, 21409, 21597, 21785, 21974, 22164, 22355, 22546, + 22739, 22932, 23126, 23320, 23516, 23712, 23909, 24106, 24305, 24504, + 24703, 24904, 25105, 25307, 25510, 25713, 25917, 26121, 26326, 26532, + 26739, 26946, 27154, 27362, 27571, 27780, 27991, 28201, 28412, 28624, + 28837, 29049, 29263, 29477, 29691, 29906, 30121, 30337, 30554, 30770, + 30988, 31205, 31423, 31642, 31860, 32080, 32299, 32519, 32740, 32960, + 33181, 33403, 33624, 33846, 34068, 34291, 34513, 34736, 34959, 35183, + 35406, 35630, 35854, 36078, 36303, 36527, 36752, 36976, 37201, 37426, + 37651, 37876, 38101, 38326, 38551, 38776, 39002, 39227, 39452, 39677, + 39902, 40127, 40351, 40576, 40801, 41025, 41250, 41474, 41698, 41921, + 42145, 42368, 42592, 42814, 43037, 43259, 43482, 43703, 43925, 44146, + 44367, 44587, 44807, 45027, 45246, 45465, 45683, 45901, 46118, 46335, + 46552, 46768, 46983, 47198, 47412, 47626, 47839, 48051, 48263, 48475, + 48685, 48895, 49104, 49313, 49521, 49728, 49934, 50140, 50345, 50549, + 50752, 50955, 51156, 51357, 51557, 51756, 51954, 52152, 52348, 52543, + 52738, 52931, 53124, 53315, 53506, 53695, 53884, 54071, 54257, 54443, + 54627, 54810, 54992, 55173, 55352, 55531, 55708, 55884, 56059, 56233, + 56405, 56576, 56746, 56915, 57082, 57248, 57413, 57576, 57738, 57899, + 58059, 58217, 58373, 58528, 58682, 58834, 58985, 59135, 59283, 59429, + 59574, 59718, 59860, 60000, 60139, 60277, 60413, 60547, 60680, 60811, + 60940, 61068, 61194, 61319, 61442, 61563, 61683, 61801, 61918, 62032, + 62145, 62256, 62366, 62474, 62580, 62684, 62786, 62887, 62986, 63083, + 63179, 63273, 63364, 63454, 63543, 63629, 63713, 63796, 63877, 63956, + 64033, 64108, 64182, 64253, 64323, 64391, 64456, 64520, 64582, 64642, + 64701, 64757, 64811, 64863, 64914, 64962, 65009, 65054, 65096, 65137, + 65176, 65212, 65247, 65280, 65311, 65340, 65367, 65391, 65414, 65435, + 65454, 65471, 65486, 65499, 65510, 65519, 65526, 65531, 65534, 65535, + 65534, 65531, 65526, 65519, 65510, 65499, 65486, 65471, 65454, 65435, + 65414, 65391, 65367, 65340, 65311, 65280, 65247, 65212, 65176, 65137, + 65096, 65054, 65009, 64962, 64914, 64863, 64811, 64757, 64701, 64642, + 64582, 64520, 64456, 64391, 64323, 64253, 64182, 64108, 64033, 63956, + 63877, 63796, 63713, 63629, 63543, 63454, 63364, 63273, 63179, 63083, + 62986, 62887, 62786, 62684, 62580, 62474, 62366, 62256, 62145, 62032, + 61918, 61801, 61683, 61563, 61442, 61319, 61194, 61068, 60940, 60811, + 60680, 60547, 60413, 60277, 60139, 60000, 59860, 59718, 59574, 59429, + 59283, 59135, 58985, 58834, 58682, 58528, 58373, 58217, 58059, 57899, + 57738, 57576, 57413, 57248, 57082, 56915, 56746, 56576, 56405, 56233, + 56059, 55884, 55708, 55531, 55352, 55173, 54992, 54810, 54627, 54443, + 54257, 54071, 53884, 53695, 53506, 53315, 53124, 52931, 52738, 52543, + 52348, 52152, 51954, 51756, 51557, 51357, 51156, 50955, 50752, 50549, + 50345, 50140, 49934, 49728, 49521, 49313, 49104, 48895, 48685, 48475, + 48263, 48051, 47839, 47626, 47412, 47198, 46983, 46768, 46552, 46335, + 46118, 45901, 45683, 45465, 45246, 45027, 44807, 44587, 44367, 44146, + 43925, 43703, 43482, 43259, 43037, 42814, 42592, 42368, 42145, 41921, + 41698, 41474, 41250, 41025, 40801, 40576, 40351, 40127, 39902, 39677, + 39452, 39227, 39002, 38776, 38551, 38326, 38101, 37876, 37651, 37426, + 37201, 36976, 36752, 36527, 36303, 36078, 35854, 35630, 35406, 35183, + 34959, 34736, 34513, 34291, 34068, 33846, 33624, 33403, 33181, 32960, + 32740, 32519, 32299, 32080, 31860, 31642, 31423, 31205, 30988, 30770, + 30554, 30337, 30121, 29906, 29691, 29477, 29263, 29049, 28837, 28624, + 28412, 28201, 27991, 27780, 27571, 27362, 27154, 26946, 26739, 26532, + 26326, 26121, 25917, 25713, 25510, 25307, 25105, 24904, 24703, 24504, + 24305, 24106, 23909, 23712, 23516, 23320, 23126, 22932, 22739, 22546, + 22355, 22164, 21974, 21785, 21597, 21409, 21222, 21036, 20851, 20667, + 20484, 20301, 20120, 19939, 19759, 19580, 19402, 19224, 19048, 18872, + 18698, 18524, 18351, 18179, 18008, 17838, 17668, 17500, 17332, 17166, + 17000, 16836, 16672, 16509, 16347, 16186, 16026, 15867, 15709, 15552, + 15396, 15240, 15086, 14933, 14780, 14629, 14478, 14329, 14180, 14032, + 13886, 13740, 13595, 13451, 13309, 13167, 13026, 12886, 12747, 12609, + 12472, 12336, 12201, 12067, 11933, 11801, 11670, 11540, 11410, 11282, + 11155, 11028, 10903, 10778, 10655, 10532, 10410, 10290, 10170, 10051, + 9933, 9816, 9700, 9585, 9471, 9358, 9246, 9135, 9024, 8915, + 8806, 8699, 8592, 8487, 8382, 8278, 8175, 8073, 7972, 7871, + 7772, 7674, 7576, 7479, 7383, 7289, 7195, 7101, 7009, 6918, + 6827, 6737, 6649, 6561, 6474, 6387, 6302, 6217, 6133, 6051, + 5968, 5887, 5807, 5727, 5648, 5570, 5493, 5417, 5341, 5266, + 5192, 5119, 5046, 4975, 4904, 4834, 4764, 4696, 4628, 4561, + 4494, 4428, 4363, 4299, 4236, 4173, 4111, 4050, 3989, 3929, + 3870, 3811, 3753, 3696, 3639, 3584, 3528, 3474, 3420, 3367, + 3314, 3262, 3211, 3160, 3110, 3061, 3012, 2964, 2916, 2869, + 2823, 2777, 2732, 2687, 2643, 2599, 2557, 2514, 2472, 2431, + 2390, 2350, 2311, 2272, 2233, 2195, 2157, 2120, 2084, 2048, + 2012, 1977, 1943, 1909, 1875, 1842, 1810, 1778, 1746, 1715, + 1684, 1654, 1624, 1594, 1565, 1537, 1509, 1481, 1454, 1427, + 1400, 1374, 1348, 1323, 1298, 1274, 1249, 1226, 1202, 1179, + 1157, 1134, 1112, 1091, 1069, 1048, 1028, 1008, 988, 968, + 949, 930, 911, 893, 875, 857, 840, 823, 806, 789, + 773, 757, 741, 726, 711, 696, 681, 667, 652, 639, + 625, 612, 598, 585, 573, 560, 548, 536, 524, 513, + 501, 490, 479, 469, 458, 448, 438, 428, 418, 408, + 399, 390, 381, 372, 363, 355, 347, 338, 330, 323, + 315, 307, 300, 293, 286, 279, 272, 265, 259, 253, + 246, 240, 234, 228, 223, 217, 212, 206, 201, 196, + 191, 186, 181, 177, 172, 167, 163, 159, 155, 151, + 147, 143, 139, 135, 131, 128, 124, 121, 118, 114, + 111, 108, 105, 102, 99, 97, 94, 91, 89, 86, + 84, 81, 79, 77, 74, 72, 70, 68, 66, 64, + 62, 60, 58, 57, 55, 53, 52, 50, 49, 47, + 46, 44, 43, 41, 40, 39, 38, 36, 35, 34, + 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, + 24, 23, 22, 21, 20, 20, 19, 18, 18, 17, + 17, 16, 15, 15, 14, 14, 13, 13, 12, 12, + 11, 11, 11, 10, 10, 9, 9, 9, 8, 8, + 8, 8, 7, 7, 7, 6, 6, 6, 6, 5, + 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, + 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, + -2, -3, -3, -3, -3, -3, -3, -3, -3, -4, + -4, -4, -4, -4, -4, -5, -5, -5, -5, -5, + -6, -6, -6, -6, -7, -7, -7, -8, -8, -8, + -8, -9, -9, -9, -10, -10, -11, -11, -11, -12, + -12, -13, -13, -14, -14, -15, -15, -16, -17, -17, + -18, -18, -19, -20, -20, -21, -22, -23, -24, -24, + -25, -26, -27, -28, -29, -30, -31, -32, -33, -34, + -35, -36, -38, -39, -40, -41, -43, -44, -46, -47, + -49, -50, -52, -53, -55, -57, -58, -60, -62, -64, + -66, -68, -70, -72, -74, -77, -79, -81, -84, -86, + -89, -91, -94, -97, -99, -102, -105, -108, -111, -114, + -118, -121, -124, -128, -131, -135, -139, -143, -147, -151, + -155, -159, -163, -167, -172, -177, -181, -186, -191, -196, + -201, -206, -212, -217, -223, -228, -234, -240, -246, -253, + -259, -265, -272, -279, -286, -293, -300, -307, -315, -323, + -330, -338, -347, -355, -363, -372, -381, -390, -399, -408, + -418, -428, -438, -448, -458, -469, -479, -490, -501, -513, + -524, -536, -548, -560, -573, -585, -598, -612, -625, -639, + -652, -667, -681, -696, -711, -726, -741, -757, -773, -789, + -806, -823, -840, -857, -875, -893, -911, -930, -949, -968, + -988, -1008, -1028, -1048, -1069, -1091, -1112, -1134, -1157, -1179, + -1202, -1226, -1249, -1274, -1298, -1323, -1348, -1374, -1400, -1427, + -1454, -1481, -1509, -1537, -1565, -1594, -1624, -1654, -1684, -1715, + -1746, -1778, -1810, -1842, -1875, -1909, -1943, -1977, -2012, -2048, + -2084, -2120, -2157, -2195, -2233, -2272, -2311, -2350, -2390, -2431, + -2472, -2514, -2557, -2599, -2643, -2687, -2732, -2777, -2823, -2869, + -2916, -2964, -3012, -3061, -3110, -3160, -3211, -3262, -3314, -3367, + -3420, -3474, -3528, -3584, -3639, -3696, -3753, -3811, -3870, -3929, + -3989, -4050, -4111, -4173, -4236, -4299, -4363, -4428, -4494, -4561, + -4628, -4696, -4764, -4834, -4904, -4975, -5046, -5119, -5192, -5266, + -5341, -5417, -5493, -5570, -5648, -5727, -5807, -5887, -5968, -6051, + -6133, -6217, -6302, -6387, -6474, -6561, -6649, -6737, -6827, -6918, + -7009, -7101, -7195, -7289, -7383, -7479, -7576, -7674, -7772, -7871, + -7972, -8073, -8175, -8278, -8382, -8487, -8592, -8699, -8806, -8915, + -9024, -9135, -9246, -9358, -9471, -9585, -9700, -9816, -9933, -10051, + -10170, -10290, -10410, -10532, -10655, -10778, -10903, -11028, -11155, -11282, + -11410, -11540, -11670, -11801, -11933, -12067, -12201, -12336, -12472, -12609, + -12747, -12886, -13026, -13167, -13309, -13451, -13595, -13740, -13886, -14032, + -14180, -14329, -14478, -14629, -14780, -14933, -15086, -15240, -15396, -15552, + -15709, -15867, -16026, -16186, -16347, -16509, -16672, -16836, -17000, -17166, + -17332, -17500, -17668, -17838, -18008, -18179, -18351, -18524, -18698, -18872, + -19048, -19224, -19402, -19580, -19759, -19939, -20120, -20301, -20484, -20667, + -20851, -21036, -21222, -21409, -21597, -21785, -21974, -22164, -22355, -22546, + -22739, -22932, -23126, -23320, -23516, -23712, -23909, -24106, -24305, -24504, + -24703, -24904, -25105, -25307, -25510, -25713, -25917, -26121, -26326, -26532, + -26739, -26946, -27154, -27362, -27571, -27780, -27991, -28201, -28412, -28624, + -28837, -29049, -29263, -29477, -29691, -29906, -30121, -30337, -30554, -30770, + -30988, -31205, -31423, -31642, -31860, -32080, -32299, -32519, -32740, -32960, + -33181, -33403, -33624, -33846, -34068, -34291, -34513, -34736, -34959, -35183, + -35406, -35630, -35854, -36078, -36303, -36527, -36752, -36976, -37201, -37426, + -37651, -37876, -38101, -38326, -38551, -38776, -39002, -39227, -39452, -39677, + -39902, -40127, -40351, -40576, -40801, -41025, -41250, -41474, -41698, -41921, + -42145, -42368, -42592, -42814, -43037, -43259, -43482, -43703, -43925, -44146, + -44367, -44587, -44807, -45027, -45246, -45465, -45683, -45901, -46118, -46335, + -46552, -46768, -46983, -47198, -47412, -47626, -47839, -48051, -48263, -48475, + -48685, -48895, -49104, -49313, -49521, -49728, -49934, -50140, -50345, -50549, + -50752, -50955, -51156, -51357, -51557, -51756, -51954, -52152, -52348, -52543, + -52738, -52931, -53124, -53315, -53506, -53695, -53884, -54071, -54257, -54443, + -54627, -54810, -54992, -55173, -55352, -55531, -55708, -55884, -56059, -56233, + -56405, -56576, -56746, -56915, -57082, -57248, -57413, -57576, -57738, -57899, + -58059, -58217, -58373, -58528, -58682, -58834, -58985, -59135, -59283, -59429, + -59574, -59718, -59860, -60000, -60139, -60277, -60413, -60547, -60680, -60811, + -60940, -61068, -61194, -61319, -61442, -61563, -61683, -61801, -61918, -62032, + -62145, -62256, -62366, -62474, -62580, -62684, -62786, -62887, -62986, -63083, + -63179, -63273, -63364, -63454, -63543, -63629, -63713, -63796, -63877, -63956, + -64033, -64108, -64182, -64253, -64323, -64391, -64456, -64520, -64582, -64642, + -64701, -64757, -64811, -64863, -64914, -64962, -65009, -65054, -65096, -65137, + -65176, -65212, -65247, -65280, -65311, -65340, -65367, -65391, -65414, -65435, + -65454, -65471, -65486, -65499, -65510, -65519, -65526, -65531, -65534, -65535, + -65534, -65531, -65526, -65519, -65510, -65499, -65486, -65471, -65454, -65435, + -65414, -65391, -65367, -65340, -65311, -65280, -65247, -65212, -65176, -65137, + -65096, -65054, -65009, -64962, -64914, -64863, -64811, -64757, -64701, -64642, + -64582, -64520, -64456, -64391, -64323, -64253, -64182, -64108, -64033, -63956, + -63877, -63796, -63713, -63629, -63543, -63454, -63364, -63273, -63179, -63083, + -62986, -62887, -62786, -62684, -62580, -62474, -62366, -62256, -62145, -62032, + -61918, -61801, -61683, -61563, -61442, -61319, -61194, -61068, -60940, -60811, + -60680, -60547, -60413, -60277, -60139, -60000, -59860, -59718, -59574, -59429, + -59283, -59135, -58985, -58834, -58682, -58528, -58373, -58217, -58059, -57899, + -57738, -57576, -57413, -57248, -57082, -56915, -56746, -56576, -56405, -56233, + -56059, -55884, -55708, -55531, -55352, -55173, -54992, -54810, -54627, -54443, + -54257, -54071, -53884, -53695, -53506, -53315, -53124, -52931, -52738, -52543, + -52348, -52152, -51954, -51756, -51557, -51357, -51156, -50955, -50752, -50549, + -50345, -50140, -49934, -49728, -49521, -49313, -49104, -48895, -48685, -48475, + -48263, -48051, -47839, -47626, -47412, -47198, -46983, -46768, -46552, -46335, + -46118, -45901, -45683, -45465, -45246, -45027, -44807, -44587, -44367, -44146, + -43925, -43703, -43482, -43259, -43037, -42814, -42592, -42368, -42145, -41921, + -41698, -41474, -41250, -41025, -40801, -40576, -40351, -40127, -39902, -39677, + -39452, -39227, -39002, -38776, -38551, -38326, -38101, -37876, -37651, -37426, + -37201, -36976, -36752, -36527, -36303, -36078, -35854, -35630, -35406, -35183, + -34959, -34736, -34513, -34291, -34068, -33846, -33624, -33403, -33181, -32960, + -32740, -32519, -32299, -32080, -31860, -31642, -31423, -31205, -30988, -30770, + -30554, -30337, -30121, -29906, -29691, -29477, -29263, -29049, -28837, -28624, + -28412, -28201, -27991, -27780, -27571, -27362, -27154, -26946, -26739, -26532, + -26326, -26121, -25917, -25713, -25510, -25307, -25105, -24904, -24703, -24504, + -24305, -24106, -23909, -23712, -23516, -23320, -23126, -22932, -22739, -22546, + -22355, -22164, -21974, -21785, -21597, -21409, -21222, -21036, -20851, -20667, + -20484, -20301, -20120, -19939, -19759, -19580, -19402, -19224, -19048, -18872, + -18698, -18524, -18351, -18179, -18008, -17838, -17668, -17500, -17332, -17166, + -17000, -16836, -16672, -16509, -16347, -16186, -16026, -15867, -15709, -15552, + -15396, -15240, -15086, -14933, -14780, -14629, -14478, -14329, -14180, -14032, + -13886, -13740, -13595, -13451, -13309, -13167, -13026, -12886, -12747, -12609, + -12472, -12336, -12201, -12067, -11933, -11801, -11670, -11540, -11410, -11282, + -11155, -11028, -10903, -10778, -10655, -10532, -10410, -10290, -10170, -10051, + -9933, -9816, -9700, -9585, -9471, -9358, -9246, -9135, -9024, -8915, + -8806, -8699, -8592, -8487, -8382, -8278, -8175, -8073, -7972, -7871, + -7772, -7674, -7576, -7479, -7383, -7289, -7195, -7101, -7009, -6918, + -6827, -6737, -6649, -6561, -6474, -6387, -6302, -6217, -6133, -6051, + -5968, -5887, -5807, -5727, -5648, -5570, -5493, -5417, -5341, -5266, + -5192, -5119, -5046, -4975, -4904, -4834, -4764, -4696, -4628, -4561, + -4494, -4428, -4363, -4299, -4236, -4173, -4111, -4050, -3989, -3929, + -3870, -3811, -3753, -3696, -3639, -3584, -3528, -3474, -3420, -3367, + -3314, -3262, -3211, -3160, -3110, -3061, -3012, -2964, -2916, -2869, + -2823, -2777, -2732, -2687, -2643, -2599, -2557, -2514, -2472, -2431, + -2390, -2350, -2311, -2272, -2233, -2195, -2157, -2120, -2084, -2048, + -2012, -1977, -1943, -1909, -1875, -1842, -1810, -1778, -1746, -1715, + -1684, -1654, -1624, -1594, -1565, -1537, -1509, -1481, -1454, -1427, + -1400, -1374, -1348, -1323, -1298, -1274, -1249, -1226, -1202, -1179, + -1157, -1134, -1112, -1091, -1069, -1048, -1028, -1008, -988, -968, + -949, -930, -911, -893, -875, -857, -840, -823, -806, -789, + -773, -757, -741, -726, -711, -696, -681, -667, -652, -639, + -625, -612, -598, -585, -573, -560, -548, -536, -524, -513, + -501, -490, -479, -469, -458, -448, -438, -428, -418, -408, + -399, -390, -381, -372, -363, -355, -347, -338, -330, -323, + -315, -307, -300, -293, -286, -279, -272, -265, -259, -253, + -246, -240, -234, -228, -223, -217, -212, -206, -201, -196, + -191, -186, -181, -177, -172, -167, -163, -159, -155, -151, + -147, -143, -139, -135, -131, -128, -124, -121, -118, -114, + -111, -108, -105, -102, -99, -97, -94, -91, -89, -86, + -84, -81, -79, -77, -74, -72, -70, -68, -66, -64, + -62, -60, -58, -57, -55, -53, -52, -50, -49, -47, + -46, -44, -43, -41, -40, -39, -38, -36, -35, -34, + -33, -32, -31, -30, -29, -28, -27, -26, -25, -24, + -24, -23, -22, -21, -20, -20, -19, -18, -18, -17, + -17, -16, -15, -15, -14, -14, -13, -13, -12, -12, + -11, -11, -11, -10, -10, -9, -9, -9, -8, -8, + -8, -8, -7, -7, -7, -6, -6, -6, -6, -5, + -5, -5, -5, -5, -4, -4, -4, -4, -4, -4, + -3, -3, -3, -3, -3, -3, -3, -3, -2, -2, + -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; diff --git a/software/include/tf_snap.h b/software/include/tf_snap.h new file mode 100644 index 0000000..c0a0f46 --- /dev/null +++ b/software/include/tf_snap.h @@ -0,0 +1,362 @@ +const int tf_snap[] = { + 0, 8, 15, 23, 31, 39, 46, 54, 62, 70, + 78, 85, 93, 101, 109, 117, 125, 133, 140, 148, + 156, 164, 172, 180, 188, 196, 204, 212, 220, 228, + 236, 244, 252, 260, 268, 276, 284, 292, 300, 308, + 316, 324, 332, 340, 348, 356, 365, 373, 381, 389, + 397, 405, 414, 422, 430, 438, 446, 455, 463, 471, + 479, 488, 496, 504, 512, 521, 529, 537, 546, 554, + 562, 571, 579, 588, 596, 604, 613, 621, 630, 638, + 646, 655, 663, 672, 680, 689, 697, 706, 714, 723, + 731, 740, 749, 757, 766, 774, 783, 792, 800, 809, + 817, 826, 835, 843, 852, 861, 870, 878, 887, 896, + 904, 913, 922, 931, 940, 948, 957, 966, 975, 984, + 992, 1001, 1010, 1019, 1028, 1037, 1046, 1055, 1064, 1073, + 1081, 1090, 1099, 1108, 1117, 1126, 1135, 1144, 1153, 1163, + 1172, 1181, 1190, 1199, 1208, 1217, 1226, 1235, 1244, 1254, + 1263, 1272, 1281, 1290, 1299, 1309, 1318, 1327, 1336, 1346, + 1355, 1364, 1374, 1383, 1392, 1401, 1411, 1420, 1430, 1439, + 1448, 1458, 1467, 1476, 1486, 1495, 1505, 1514, 1524, 1533, + 1543, 1552, 1562, 1571, 1581, 1590, 1600, 1610, 1619, 1629, + 1638, 1648, 1658, 1667, 1677, 1687, 1696, 1706, 1716, 1725, + 1735, 1745, 1754, 1764, 1774, 1784, 1794, 1803, 1813, 1823, + 1833, 1843, 1853, 1862, 1872, 1882, 1892, 1902, 1912, 1922, + 1932, 1942, 1952, 1962, 1972, 1982, 1992, 2002, 2012, 2022, + 2032, 2042, 2052, 2063, 2073, 2083, 2093, 2103, 2113, 2124, + 2134, 2144, 2154, 2164, 2175, 2185, 2195, 2206, 2216, 2226, + 2237, 2247, 2257, 2268, 2278, 2288, 2299, 2309, 2320, 2330, + 2341, 2351, 2361, 2372, 2383, 2393, 2404, 2414, 2425, 2435, + 2446, 2456, 2467, 2478, 2488, 2499, 2510, 2520, 2531, 2542, + 2552, 2563, 2574, 2585, 2595, 2606, 2617, 2628, 2639, 2650, + 2660, 2671, 2682, 2693, 2704, 2715, 2726, 2737, 2748, 2759, + 2770, 2781, 2792, 2803, 2814, 2825, 2836, 2847, 2858, 2869, + 2880, 2892, 2903, 2914, 2925, 2936, 2947, 2959, 2970, 2981, + 2992, 3004, 3015, 3026, 3038, 3049, 3060, 3072, 3083, 3095, + 3106, 3117, 3129, 3140, 3152, 3163, 3175, 3186, 3198, 3209, + 3221, 3232, 3244, 3256, 3267, 3279, 3291, 3302, 3314, 3326, + 3337, 3349, 3361, 3373, 3384, 3396, 3408, 3420, 3432, 3443, + 3455, 3467, 3479, 3491, 3503, 3515, 3527, 3539, 3551, 3563, + 3575, 3587, 3599, 3611, 3623, 3635, 3647, 3659, 3671, 3683, + 3696, 3708, 3720, 3732, 3744, 3757, 3769, 3781, 3794, 3806, + 3818, 3831, 3843, 3855, 3868, 3880, 3893, 3905, 3917, 3930, + 3942, 3955, 3967, 3980, 3993, 4005, 4018, 4030, 4043, 4056, + 4068, 4081, 4094, 4106, 4119, 4132, 4144, 4157, 4170, 4183, + 4196, 4208, 4221, 4234, 4247, 4260, 4273, 4286, 4299, 4312, + 4325, 4338, 4351, 4364, 4377, 4390, 4403, 4416, 4429, 4442, + 4456, 4469, 4482, 4495, 4508, 4522, 4535, 4548, 4562, 4575, + 4588, 4602, 4615, 4628, 4642, 4655, 4669, 4682, 4696, 4709, + 4723, 4736, 4750, 4763, 4777, 4791, 4804, 4818, 4831, 4845, + 4859, 4873, 4886, 4900, 4914, 4928, 4941, 4955, 4969, 4983, + 4997, 5011, 5025, 5039, 5053, 5067, 5081, 5095, 5109, 5123, + 5137, 5151, 5165, 5179, 5193, 5208, 5222, 5236, 5250, 5264, + 5279, 5293, 5307, 5322, 5336, 5350, 5365, 5379, 5394, 5408, + 5422, 5437, 5451, 5466, 5481, 5495, 5510, 5524, 5539, 5554, + 5568, 5583, 5598, 5612, 5627, 5642, 5657, 5672, 5686, 5701, + 5716, 5731, 5746, 5761, 5776, 5791, 5806, 5821, 5836, 5851, + 5866, 5881, 5896, 5911, 5926, 5942, 5957, 5972, 5987, 6003, + 6018, 6033, 6049, 6064, 6079, 6095, 6110, 6126, 6141, 6156, + 6172, 6188, 6203, 6219, 6234, 6250, 6265, 6281, 6297, 6313, + 6328, 6344, 6360, 6376, 6391, 6407, 6423, 6439, 6455, 6471, + 6487, 6503, 6519, 6535, 6551, 6567, 6583, 6599, 6615, 6631, + 6647, 6664, 6680, 6696, 6712, 6729, 6745, 6761, 6778, 6794, + 6811, 6827, 6843, 6860, 6876, 6893, 6909, 6926, 6943, 6959, + 6976, 6993, 7009, 7026, 7043, 7060, 7076, 7093, 7110, 7127, + 7144, 7161, 7178, 7195, 7212, 7229, 7246, 7263, 7280, 7297, + 7314, 7331, 7348, 7366, 7383, 7400, 7417, 7435, 7452, 7469, + 7487, 7504, 7522, 7539, 7556, 7574, 7592, 7609, 7627, 7644, + 7662, 7680, 7697, 7715, 7733, 7751, 7768, 7786, 7804, 7822, + 7840, 7858, 7876, 7894, 7912, 7930, 7948, 7966, 7984, 8002, + 8020, 8038, 8057, 8075, 8093, 8112, 8130, 8148, 8167, 8185, + 8203, 8222, 8240, 8259, 8277, 8296, 8315, 8333, 8352, 8371, + 8389, 8408, 8427, 8446, 8464, 8483, 8502, 8521, 8540, 8559, + 8578, 8597, 8616, 8635, 8654, 8673, 8693, 8712, 8731, 8750, + 8770, 8789, 8808, 8828, 8847, 8866, 8886, 8905, 8925, 8945, + 8964, 8984, 9003, 9023, 9043, 9062, 9082, 9102, 9122, 9142, + 9162, 9181, 9201, 9221, 9241, 9261, 9281, 9302, 9322, 9342, + 9362, 9382, 9402, 9423, 9443, 9463, 9484, 9504, 9525, 9545, + 9566, 9586, 9607, 9627, 9648, 9669, 9689, 9710, 9731, 9752, + 9772, 9793, 9814, 9835, 9856, 9877, 9898, 9919, 9940, 9961, + 9982, 10003, 10025, 10046, 10067, 10088, 10110, 10131, 10153, 10174, + 10196, 10217, 10239, 10260, 10282, 10303, 10325, 10347, 10369, 10390, + 10412, 10434, 10456, 10478, 10500, 10522, 10544, 10566, 10588, 10610, + 10632, 10654, 10677, 10699, 10721, 10743, 10766, 10788, 10811, 10833, + 10856, 10878, 10901, 10923, 10946, 10969, 10992, 11014, 11037, 11060, + 11083, 11106, 11129, 11152, 11175, 11198, 11221, 11244, 11267, 11290, + 11314, 11337, 11360, 11384, 11407, 11430, 11454, 11477, 11501, 11525, + 11548, 11572, 11595, 11619, 11643, 11667, 11691, 11715, 11738, 11762, + 11786, 11811, 11835, 11859, 11883, 11907, 11931, 11956, 11980, 12004, + 12029, 12053, 12078, 12102, 12127, 12151, 12176, 12201, 12225, 12250, + 12275, 12300, 12325, 12350, 12375, 12400, 12425, 12450, 12475, 12500, + 12525, 12550, 12576, 12601, 12626, 12652, 12677, 12703, 12728, 12754, + 12780, 12805, 12831, 12857, 12883, 12908, 12934, 12960, 12986, 13012, + 13038, 13064, 13091, 13117, 13143, 13169, 13196, 13222, 13248, 13275, + 13301, 13328, 13355, 13381, 13408, 13435, 13461, 13488, 13515, 13542, + 13569, 13596, 13623, 13650, 13677, 13704, 13732, 13759, 13786, 13814, + 13841, 13868, 13896, 13924, 13951, 13979, 14006, 14034, 14062, 14090, + 14118, 14146, 14174, 14202, 14230, 14258, 14286, 14314, 14343, 14371, + 14399, 14428, 14456, 14485, 14513, 14542, 14570, 14599, 14628, 14657, + 14686, 14714, 14743, 14772, 14801, 14831, 14860, 14889, 14918, 14948, + 14977, 15006, 15036, 15065, 15095, 15124, 15154, 15184, 15214, 15243, + 15273, 15303, 15333, 15363, 15393, 15423, 15454, 15484, 15514, 15545, + 15575, 15605, 15636, 15666, 15697, 15728, 15759, 15789, 15820, 15851, + 15882, 15913, 15944, 15975, 16006, 16037, 16069, 16100, 16131, 16163, + 16194, 16226, 16258, 16289, 16321, 16353, 16385, 16416, 16448, 16480, + 16512, 16545, 16577, 16609, 16641, 16674, 16706, 16739, 16771, 16804, + 16836, 16869, 16902, 16935, 16967, 17000, 17033, 17066, 17100, 17133, + 17166, 17199, 17233, 17266, 17300, 17333, 17367, 17400, 17434, 17468, + 17502, 17536, 17570, 17604, 17638, 17672, 17706, 17740, 17775, 17809, + 17844, 17878, 17913, 17947, 17982, 18017, 18052, 18087, 18122, 18157, + 18192, 18227, 18262, 18297, 18333, 18368, 18404, 18439, 18475, 18511, + 18546, 18582, 18618, 18654, 18690, 18726, 18762, 18799, 18835, 18871, + 18908, 18944, 18981, 19017, 19054, 19091, 19128, 19165, 19202, 19239, + 19276, 19313, 19350, 19388, 19425, 19462, 19500, 19538, 19575, 19613, + 19651, 19689, 19727, 19765, 19803, 19841, 19879, 19918, 19956, 19994, + 20033, 20072, 20110, 20149, 20188, 20227, 20266, 20305, 20344, 20383, + 20423, 20462, 20501, 20541, 20580, 20620, 20660, 20700, 20740, 20780, + 20820, 20860, 20900, 20940, 20981, 21021, 21062, 21102, 21143, 21184, + 21224, 21265, 21306, 21347, 21389, 21430, 21471, 21512, 21554, 21596, + 21637, 21679, 21721, 21763, 21804, 21847, 21889, 21931, 21973, 22016, + 22058, 22101, 22143, 22186, 22229, 22272, 22314, 22358, 22401, 22444, + 22487, 22531, 22574, 22618, 22661, 22705, 22749, 22793, 22837, 22881, + 22925, 22969, 23013, 23058, 23102, 23147, 23192, 23237, 23281, 23326, + 23371, 23417, 23462, 23507, 23553, 23598, 23644, 23689, 23735, 23781, + 23827, 23873, 23919, 23965, 24012, 24058, 24105, 24151, 24198, 24245, + 24292, 24339, 24386, 24433, 24480, 24528, 24575, 24623, 24671, 24718, + 24766, 24814, 24862, 24910, 24959, 25007, 25055, 25104, 25153, 25201, + 25250, 25299, 25348, 25398, 25447, 25496, 25546, 25595, 25645, 25695, + 25745, 25795, 25845, 25895, 25945, 25996, 26046, 26097, 26147, 26198, + 26249, 26300, 26351, 26403, 26454, 26505, 26557, 26609, 26660, 26712, + 26764, 26816, 26869, 26921, 26973, 27026, 27079, 27131, 27184, 27237, + 27290, 27344, 27397, 27450, 27504, 27558, 27612, 27665, 27719, 27774, + 27828, 27882, 27937, 27991, 28046, 28101, 28156, 28211, 28266, 28321, + 28377, 28432, 28488, 28544, 28600, 28656, 28712, 28768, 28824, 28881, + 28938, 28994, 29051, 29108, 29165, 29223, 29280, 29337, 29395, 29453, + 29511, 29569, 29627, 29685, 29743, 29802, 29861, 29919, 29978, 30037, + 30096, 30156, 30215, 30275, 30334, 30394, 30454, 30514, 30574, 30635, + 30695, 30756, 30816, 30877, 30938, 30999, 31061, 31122, 31184, 31245, + 31307, 31369, 31431, 31493, 31556, 31618, 31681, 31744, 31807, 31870, + 31933, 31996, 32060, 32123, 32187, 32251, 32315, 32379, 32444, 32508, + 32573, 32638, 32703, 32768, 32833, 32898, 32964, 33030, 33096, 33161, + 33228, 33294, 33360, 33427, 33494, 33561, 33628, 33695, 33762, 33830, + 33897, 33965, 34033, 34101, 34170, 34238, 34307, 34375, 34444, 34513, + 34583, 34652, 34721, 34791, 34861, 34931, 35001, 35072, 35142, 35213, + 35284, 35355, 35426, 35497, 35569, 35641, 35712, 35784, 35857, 35929, + 36002, 36074, 36147, 36220, 36293, 36367, 36440, 36514, 36588, 36662, + 36736, 36811, 36885, 36960, 37035, 37110, 37186, 37261, 37337, 37413, + 37489, 37565, 37641, 37718, 37795, 37872, 37949, 38026, 38104, 38181, + 38259, 38337, 38416, 38494, 38573, 38652, 38731, 38810, 38889, 38969, + 39049, 39129, 39209, 39289, 39370, 39450, 39531, 39613, 39694, 39775, + 39857, 39939, 40021, 40104, 40186, 40269, 40352, 40435, 40518, 40602, + 40686, 40770, 40854, 40938, 41023, 41108, 41193, 41278, 41364, 41449, + 41535, 41621, 41707, 41794, 41881, 41968, 42055, 42142, 42230, 42318, + 42406, 42494, 42582, 42671, 42760, 42849, 42939, 43028, 43118, 43208, + 43298, 43389, 43480, 43571, 43662, 43753, 43845, 43937, 44029, 44121, + 44214, 44307, 44400, 44493, 44587, 44680, 44774, 44869, 44963, 45058, + 45153, 45248, 45344, 45439, 45535, 45632, 45728, 45825, 45922, 46019, + 46117, 46214, 46312, 46411, 46509, 46608, 46707, 46806, 46906, 47005, + 47105, 47206, 47306, 47407, 47508, 47610, 47711, 47813, 47915, 48018, + 48120, 48223, 48327, 48430, 48534, 48638, 48742, 48847, 48952, 49057, + 49162, 49268, 49374, 49481, 49587, 49694, 49801, 49909, 50016, 50124, + 50233, 50341, 50450, 50559, 50669, 50779, 50889, 50999, 51110, 51221, + 51332, 51443, 51555, 51667, 51780, 51893, 52006, 52119, 52233, 52347, + 52461, 52576, 52691, 52806, 52922, 53038, 53154, 53270, 53387, 53504, + 53622, 53740, 53858, 53976, 54095, 54214, 54334, 54454, 54574, 54694, + 54815, 54936, 55058, 55180, 55302, 55424, 55547, 55670, 55794, 55918, + 56042, 56166, 56291, 56417, 56542, 56668, 56795, 56921, 57048, 57176, + 57304, 57432, 57560, 57689, 57818, 57948, 58078, 58208, 58339, 58470, + 58602, 58733, 58866, 58998, 59131, 59265, 59398, 59533, 59667, 59802, + 59937, 60073, 60209, 60346, 60482, 60620, 60757, 60895, 61034, 61173, + 61312, 61452, 61592, 61732, 61873, 62015, 62156, 62299, 62441, 62584, + 62728, 62871, 63016, 63160, 63306, 63451, 63597, 63743, 63890, 64038, + 64185, 64334, 64482, 64631, 64781, 64931, 65081, 65232, 65383, 65535, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -65535, -65383, -65232, -65081, -64931, -64781, -64631, -64482, -64334, -64185, + -64038, -63890, -63743, -63597, -63451, -63306, -63160, -63016, -62871, -62728, + -62584, -62441, -62299, -62156, -62015, -61873, -61732, -61592, -61452, -61312, + -61173, -61034, -60895, -60757, -60620, -60482, -60346, -60209, -60073, -59937, + -59802, -59667, -59533, -59398, -59265, -59131, -58998, -58866, -58733, -58602, + -58470, -58339, -58208, -58078, -57948, -57818, -57689, -57560, -57432, -57304, + -57176, -57048, -56921, -56795, -56668, -56542, -56417, -56291, -56166, -56042, + -55918, -55794, -55670, -55547, -55424, -55302, -55180, -55058, -54936, -54815, + -54694, -54574, -54454, -54334, -54214, -54095, -53976, -53858, -53740, -53622, + -53504, -53387, -53270, -53154, -53038, -52922, -52806, -52691, -52576, -52461, + -52347, -52233, -52119, -52006, -51893, -51780, -51667, -51555, -51443, -51332, + -51221, -51110, -50999, -50889, -50779, -50669, -50559, -50450, -50341, -50233, + -50124, -50016, -49909, -49801, -49694, -49587, -49481, -49374, -49268, -49162, + -49057, -48952, -48847, -48742, -48638, -48534, -48430, -48327, -48223, -48120, + -48018, -47915, -47813, -47711, -47610, -47508, -47407, -47306, -47206, -47105, + -47005, -46906, -46806, -46707, -46608, -46509, -46411, -46312, -46214, -46117, + -46019, -45922, -45825, -45728, -45632, -45535, -45439, -45344, -45248, -45153, + -45058, -44963, -44869, -44774, -44680, -44587, -44493, -44400, -44307, -44214, + -44121, -44029, -43937, -43845, -43753, -43662, -43571, -43480, -43389, -43298, + -43208, -43118, -43028, -42939, -42849, -42760, -42671, -42582, -42494, -42406, + -42318, -42230, -42142, -42055, -41968, -41881, -41794, -41707, -41621, -41535, + -41449, -41364, -41278, -41193, -41108, -41023, -40938, -40854, -40770, -40686, + -40602, -40518, -40435, -40352, -40269, -40186, -40104, -40021, -39939, -39857, + -39775, -39694, -39613, -39531, -39450, -39370, -39289, -39209, -39129, -39049, + -38969, -38889, -38810, -38731, -38652, -38573, -38494, -38416, -38337, -38259, + -38181, -38104, -38026, -37949, -37872, -37795, -37718, -37641, -37565, -37489, + -37413, -37337, -37261, -37186, -37110, -37035, -36960, -36885, -36811, -36736, + -36662, -36588, -36514, -36440, -36367, -36293, -36220, -36147, -36074, -36002, + -35929, -35857, -35784, -35712, -35641, -35569, -35497, -35426, -35355, -35284, + -35213, -35142, -35072, -35001, -34931, -34861, -34791, -34721, -34652, -34583, + -34513, -34444, -34375, -34307, -34238, -34170, -34101, -34033, -33965, -33897, + -33830, -33762, -33695, -33628, -33561, -33494, -33427, -33360, -33294, -33228, + -33161, -33096, -33030, -32964, -32898, -32833, -32768, -32703, -32638, -32573, + -32508, -32444, -32379, -32315, -32251, -32187, -32123, -32060, -31996, -31933, + -31870, -31807, -31744, -31681, -31618, -31556, -31493, -31431, -31369, -31307, + -31245, -31184, -31122, -31061, -30999, -30938, -30877, -30816, -30756, -30695, + -30635, -30574, -30514, -30454, -30394, -30334, -30275, -30215, -30156, -30096, + -30037, -29978, -29919, -29861, -29802, -29743, -29685, -29627, -29569, -29511, + -29453, -29395, -29337, -29280, -29223, -29165, -29108, -29051, -28994, -28938, + -28881, -28824, -28768, -28712, -28656, -28600, -28544, -28488, -28432, -28377, + -28321, -28266, -28211, -28156, -28101, -28046, -27991, -27937, -27882, -27828, + -27774, -27719, -27665, -27612, -27558, -27504, -27450, -27397, -27344, -27290, + -27237, -27184, -27131, -27079, -27026, -26973, -26921, -26869, -26816, -26764, + -26712, -26660, -26609, -26557, -26505, -26454, -26403, -26351, -26300, -26249, + -26198, -26147, -26097, -26046, -25996, -25945, -25895, -25845, -25795, -25745, + -25695, -25645, -25595, -25546, -25496, -25447, -25398, -25348, -25299, -25250, + -25201, -25153, -25104, -25055, -25007, -24959, -24910, -24862, -24814, -24766, + -24718, -24671, -24623, -24575, -24528, -24480, -24433, -24386, -24339, -24292, + -24245, -24198, -24151, -24105, -24058, -24012, -23965, -23919, -23873, -23827, + -23781, -23735, -23689, -23644, -23598, -23553, -23507, -23462, -23417, -23371, + -23326, -23281, -23237, -23192, -23147, -23102, -23058, -23013, -22969, -22925, + -22881, -22837, -22793, -22749, -22705, -22661, -22618, -22574, -22531, -22487, + -22444, -22401, -22358, -22314, -22272, -22229, -22186, -22143, -22101, -22058, + -22016, -21973, -21931, -21889, -21847, -21804, -21763, -21721, -21679, -21637, + -21596, -21554, -21512, -21471, -21430, -21389, -21347, -21306, -21265, -21224, + -21184, -21143, -21102, -21062, -21021, -20981, -20940, -20900, -20860, -20820, + -20780, -20740, -20700, -20660, -20620, -20580, -20541, -20501, -20462, -20423, + -20383, -20344, -20305, -20266, -20227, -20188, -20149, -20110, -20072, -20033, + -19994, -19956, -19918, -19879, -19841, -19803, -19765, -19727, -19689, -19651, + -19613, -19575, -19538, -19500, -19462, -19425, -19388, -19350, -19313, -19276, + -19239, -19202, -19165, -19128, -19091, -19054, -19017, -18981, -18944, -18908, + -18871, -18835, -18799, -18762, -18726, -18690, -18654, -18618, -18582, -18546, + -18511, -18475, -18439, -18404, -18368, -18333, -18297, -18262, -18227, -18192, + -18157, -18122, -18087, -18052, -18017, -17982, -17947, -17913, -17878, -17844, + -17809, -17775, -17740, -17706, -17672, -17638, -17604, -17570, -17536, -17502, + -17468, -17434, -17400, -17367, -17333, -17300, -17266, -17233, -17199, -17166, + -17133, -17100, -17066, -17033, -17000, -16967, -16935, -16902, -16869, -16836, + -16804, -16771, -16739, -16706, -16674, -16641, -16609, -16577, -16545, -16512, + -16480, -16448, -16416, -16385, -16353, -16321, -16289, -16258, -16226, -16194, + -16163, -16131, -16100, -16069, -16037, -16006, -15975, -15944, -15913, -15882, + -15851, -15820, -15789, -15759, -15728, -15697, -15666, -15636, -15605, -15575, + -15545, -15514, -15484, -15454, -15423, -15393, -15363, -15333, -15303, -15273, + -15243, -15214, -15184, -15154, -15124, -15095, -15065, -15036, -15006, -14977, + -14948, -14918, -14889, -14860, -14831, -14801, -14772, -14743, -14714, -14686, + -14657, -14628, -14599, -14570, -14542, -14513, -14485, -14456, -14428, -14399, + -14371, -14343, -14314, -14286, -14258, -14230, -14202, -14174, -14146, -14118, + -14090, -14062, -14034, -14006, -13979, -13951, -13924, -13896, -13868, -13841, + -13814, -13786, -13759, -13732, -13704, -13677, -13650, -13623, -13596, -13569, + -13542, -13515, -13488, -13461, -13435, -13408, -13381, -13355, -13328, -13301, + -13275, -13248, -13222, -13196, -13169, -13143, -13117, -13091, -13064, -13038, + -13012, -12986, -12960, -12934, -12908, -12883, -12857, -12831, -12805, -12780, + -12754, -12728, -12703, -12677, -12652, -12626, -12601, -12576, -12550, -12525, + -12500, -12475, -12450, -12425, -12400, -12375, -12350, -12325, -12300, -12275, + -12250, -12225, -12201, -12176, -12151, -12127, -12102, -12078, -12053, -12029, + -12004, -11980, -11956, -11931, -11907, -11883, -11859, -11835, -11811, -11786, + -11762, -11738, -11715, -11691, -11667, -11643, -11619, -11595, -11572, -11548, + -11525, -11501, -11477, -11454, -11430, -11407, -11384, -11360, -11337, -11314, + -11290, -11267, -11244, -11221, -11198, -11175, -11152, -11129, -11106, -11083, + -11060, -11037, -11014, -10992, -10969, -10946, -10923, -10901, -10878, -10856, + -10833, -10811, -10788, -10766, -10743, -10721, -10699, -10677, -10654, -10632, + -10610, -10588, -10566, -10544, -10522, -10500, -10478, -10456, -10434, -10412, + -10390, -10369, -10347, -10325, -10303, -10282, -10260, -10239, -10217, -10196, + -10174, -10153, -10131, -10110, -10088, -10067, -10046, -10025, -10003, -9982, + -9961, -9940, -9919, -9898, -9877, -9856, -9835, -9814, -9793, -9772, + -9752, -9731, -9710, -9689, -9669, -9648, -9627, -9607, -9586, -9566, + -9545, -9525, -9504, -9484, -9463, -9443, -9423, -9402, -9382, -9362, + -9342, -9322, -9302, -9281, -9261, -9241, -9221, -9201, -9181, -9162, + -9142, -9122, -9102, -9082, -9062, -9043, -9023, -9003, -8984, -8964, + -8945, -8925, -8905, -8886, -8866, -8847, -8828, -8808, -8789, -8770, + -8750, -8731, -8712, -8693, -8673, -8654, -8635, -8616, -8597, -8578, + -8559, -8540, -8521, -8502, -8483, -8464, -8446, -8427, -8408, -8389, + -8371, -8352, -8333, -8315, -8296, -8277, -8259, -8240, -8222, -8203, + -8185, -8167, -8148, -8130, -8112, -8093, -8075, -8057, -8038, -8020, + -8002, -7984, -7966, -7948, -7930, -7912, -7894, -7876, -7858, -7840, + -7822, -7804, -7786, -7768, -7751, -7733, -7715, -7697, -7680, -7662, + -7644, -7627, -7609, -7592, -7574, -7556, -7539, -7522, -7504, -7487, + -7469, -7452, -7435, -7417, -7400, -7383, -7366, -7348, -7331, -7314, + -7297, -7280, -7263, -7246, -7229, -7212, -7195, -7178, -7161, -7144, + -7127, -7110, -7093, -7076, -7060, -7043, -7026, -7009, -6993, -6976, + -6959, -6943, -6926, -6909, -6893, -6876, -6860, -6843, -6827, -6811, + -6794, -6778, -6761, -6745, -6729, -6712, -6696, -6680, -6664, -6647, + -6631, -6615, -6599, -6583, -6567, -6551, -6535, -6519, -6503, -6487, + -6471, -6455, -6439, -6423, -6407, -6391, -6376, -6360, -6344, -6328, + -6313, -6297, -6281, -6265, -6250, -6234, -6219, -6203, -6188, -6172, + -6156, -6141, -6126, -6110, -6095, -6079, -6064, -6049, -6033, -6018, + -6003, -5987, -5972, -5957, -5942, -5926, -5911, -5896, -5881, -5866, + -5851, -5836, -5821, -5806, -5791, -5776, -5761, -5746, -5731, -5716, + -5701, -5686, -5672, -5657, -5642, -5627, -5612, -5598, -5583, -5568, + -5554, -5539, -5524, -5510, -5495, -5481, -5466, -5451, -5437, -5422, + -5408, -5394, -5379, -5365, -5350, -5336, -5322, -5307, -5293, -5279, + -5264, -5250, -5236, -5222, -5208, -5193, -5179, -5165, -5151, -5137, + -5123, -5109, -5095, -5081, -5067, -5053, -5039, -5025, -5011, -4997, + -4983, -4969, -4955, -4941, -4928, -4914, -4900, -4886, -4873, -4859, + -4845, -4831, -4818, -4804, -4791, -4777, -4763, -4750, -4736, -4723, + -4709, -4696, -4682, -4669, -4655, -4642, -4628, -4615, -4602, -4588, + -4575, -4562, -4548, -4535, -4522, -4508, -4495, -4482, -4469, -4456, + -4442, -4429, -4416, -4403, -4390, -4377, -4364, -4351, -4338, -4325, + -4312, -4299, -4286, -4273, -4260, -4247, -4234, -4221, -4208, -4196, + -4183, -4170, -4157, -4144, -4132, -4119, -4106, -4094, -4081, -4068, + -4056, -4043, -4030, -4018, -4005, -3993, -3980, -3967, -3955, -3942, + -3930, -3917, -3905, -3893, -3880, -3868, -3855, -3843, -3831, -3818, + -3806, -3794, -3781, -3769, -3757, -3744, -3732, -3720, -3708, -3696, + -3683, -3671, -3659, -3647, -3635, -3623, -3611, -3599, -3587, -3575, + -3563, -3551, -3539, -3527, -3515, -3503, -3491, -3479, -3467, -3455, + -3443, -3432, -3420, -3408, -3396, -3384, -3373, -3361, -3349, -3337, + -3326, -3314, -3302, -3291, -3279, -3267, -3256, -3244, -3232, -3221, + -3209, -3198, -3186, -3175, -3163, -3152, -3140, -3129, -3117, -3106, + -3095, -3083, -3072, -3060, -3049, -3038, -3026, -3015, -3004, -2992, + -2981, -2970, -2959, -2947, -2936, -2925, -2914, -2903, -2892, -2880, + -2869, -2858, -2847, -2836, -2825, -2814, -2803, -2792, -2781, -2770, + -2759, -2748, -2737, -2726, -2715, -2704, -2693, -2682, -2671, -2660, + -2650, -2639, -2628, -2617, -2606, -2595, -2585, -2574, -2563, -2552, + -2542, -2531, -2520, -2510, -2499, -2488, -2478, -2467, -2456, -2446, + -2435, -2425, -2414, -2404, -2393, -2383, -2372, -2361, -2351, -2341, + -2330, -2320, -2309, -2299, -2288, -2278, -2268, -2257, -2247, -2237, + -2226, -2216, -2206, -2195, -2185, -2175, -2164, -2154, -2144, -2134, + -2124, -2113, -2103, -2093, -2083, -2073, -2063, -2052, -2042, -2032, + -2022, -2012, -2002, -1992, -1982, -1972, -1962, -1952, -1942, -1932, + -1922, -1912, -1902, -1892, -1882, -1872, -1862, -1853, -1843, -1833, + -1823, -1813, -1803, -1794, -1784, -1774, -1764, -1754, -1745, -1735, + -1725, -1716, -1706, -1696, -1687, -1677, -1667, -1658, -1648, -1638, + -1629, -1619, -1610, -1600, -1590, -1581, -1571, -1562, -1552, -1543, + -1533, -1524, -1514, -1505, -1495, -1486, -1476, -1467, -1458, -1448, + -1439, -1430, -1420, -1411, -1401, -1392, -1383, -1374, -1364, -1355, + -1346, -1336, -1327, -1318, -1309, -1299, -1290, -1281, -1272, -1263, + -1254, -1244, -1235, -1226, -1217, -1208, -1199, -1190, -1181, -1172, + -1163, -1153, -1144, -1135, -1126, -1117, -1108, -1099, -1090, -1081, + -1073, -1064, -1055, -1046, -1037, -1028, -1019, -1010, -1001, -992, + -984, -975, -966, -957, -948, -940, -931, -922, -913, -904, + -896, -887, -878, -870, -861, -852, -843, -835, -826, -817, + -809, -800, -792, -783, -774, -766, -757, -749, -740, -731, + -723, -714, -706, -697, -689, -680, -672, -663, -655, -646, + -638, -630, -621, -613, -604, -596, -588, -579, -571, -562, + -554, -546, -537, -529, -521, -512, -504, -496, -488, -479, + -471, -463, -455, -446, -438, -430, -422, -414, -405, -397, + -389, -381, -373, -365, -356, -348, -340, -332, -324, -316, + -308, -300, -292, -284, -276, -268, -260, -252, -244, -236, + -228, -220, -212, -204, -196, -188, -180, -172, -164, -156, + -148, -140, -133, -125, -117, -109, -101, -93, -85, -78, + -70, -62, -54, -46, -39, -31, -23, -15, -8, 0, +}; diff --git a/software/include/tf_spring.h b/software/include/tf_spring.h new file mode 100644 index 0000000..7202396 --- /dev/null +++ b/software/include/tf_spring.h @@ -0,0 +1,362 @@ +const int tf_spring[] = { + 62914, 62623, 62335, 62048, 61763, 61480, 61199, 60920, 60643, 60367, + 60094, 59822, 59552, 59283, 59016, 58752, 58488, 58227, 57967, 57709, + 57452, 57197, 56944, 56692, 56442, 56193, 55946, 55701, 55457, 55215, + 54974, 54734, 54496, 54260, 54025, 53792, 53560, 53329, 53100, 52872, + 52646, 52421, 52197, 51975, 51754, 51534, 51316, 51099, 50883, 50669, + 50456, 50244, 50034, 49824, 49616, 49410, 49204, 49000, 48797, 48595, + 48394, 48194, 47996, 47799, 47603, 47408, 47214, 47021, 46830, 46639, + 46450, 46262, 46074, 45888, 45703, 45519, 45336, 45154, 44973, 44794, + 44615, 44437, 44260, 44084, 43909, 43735, 43563, 43391, 43220, 43050, + 42881, 42712, 42545, 42379, 42214, 42049, 41886, 41723, 41561, 41400, + 41240, 41081, 40923, 40765, 40609, 40453, 40298, 40144, 39991, 39839, + 39687, 39536, 39386, 39237, 39089, 38941, 38794, 38648, 38503, 38359, + 38215, 38072, 37930, 37788, 37648, 37508, 37368, 37230, 37092, 36955, + 36818, 36683, 36548, 36413, 36280, 36147, 36015, 35883, 35752, 35622, + 35492, 35363, 35235, 35107, 34980, 34854, 34728, 34603, 34479, 34355, + 34232, 34109, 33987, 33866, 33745, 33625, 33505, 33386, 33268, 33150, + 33033, 32916, 32800, 32685, 32570, 32455, 32341, 32228, 32115, 32003, + 31892, 31780, 31670, 31560, 31450, 31341, 31233, 31125, 31018, 30911, + 30804, 30698, 30593, 30488, 30384, 30280, 30176, 30073, 29971, 29869, + 29767, 29666, 29566, 29466, 29366, 29267, 29168, 29070, 28972, 28875, + 28778, 28682, 28586, 28490, 28395, 28300, 28206, 28112, 28019, 27926, + 27833, 27741, 27650, 27558, 27468, 27377, 27287, 27197, 27108, 27019, + 26931, 26843, 26755, 26668, 26581, 26494, 26408, 26323, 26237, 26152, + 26068, 25983, 25900, 25816, 25733, 25650, 25568, 25486, 25404, 25323, + 25242, 25161, 25081, 25001, 24921, 24842, 24763, 24685, 24607, 24529, + 24451, 24374, 24297, 24221, 24144, 24068, 23993, 23918, 23843, 23768, + 23694, 23620, 23546, 23473, 23400, 23327, 23254, 23182, 23110, 23039, + 22968, 22897, 22826, 22756, 22685, 22616, 22546, 22477, 22408, 22339, + 22271, 22203, 22135, 22068, 22000, 21933, 21867, 21800, 21734, 21668, + 21603, 21537, 21472, 21407, 21343, 21278, 21214, 21151, 21087, 21024, + 20961, 20898, 20835, 20773, 20711, 20649, 20588, 20526, 20465, 20405, + 20344, 20284, 20224, 20164, 20104, 20045, 19986, 19927, 19868, 19809, + 19751, 19693, 19635, 19578, 19520, 19463, 19406, 19350, 19293, 19237, + 19181, 19125, 19070, 19014, 18959, 18904, 18849, 18795, 18740, 18686, + 18632, 18579, 18525, 18472, 18419, 18366, 18313, 18261, 18208, 18156, + 18104, 18052, 18001, 17950, 17898, 17847, 17797, 17746, 17696, 17645, + 17595, 17546, 17496, 17446, 17397, 17348, 17299, 17250, 17202, 17153, + 17105, 17057, 17009, 16962, 16914, 16867, 16820, 16773, 16726, 16679, + 16633, 16586, 16540, 16494, 16448, 16403, 16357, 16312, 16267, 16222, + 16177, 16132, 16088, 16043, 15999, 15955, 15911, 15867, 15824, 15780, + 15737, 15694, 15651, 15608, 15565, 15523, 15480, 15438, 15396, 15354, + 15312, 15271, 15229, 15188, 15147, 15106, 15065, 15024, 14983, 14943, + 14902, 14862, 14822, 14782, 14742, 14703, 14663, 14624, 14584, 14545, + 14506, 14467, 14429, 14390, 14352, 14313, 14275, 14237, 14199, 14161, + 14123, 14086, 14048, 14011, 13974, 13937, 13900, 13863, 13826, 13790, + 13753, 13717, 13681, 13645, 13609, 13573, 13537, 13501, 13466, 13431, + 13395, 13360, 13325, 13290, 13255, 13221, 13186, 13152, 13117, 13083, + 13049, 13015, 12981, 12947, 12913, 12880, 12846, 12813, 12780, 12747, + 12714, 12681, 12648, 12615, 12582, 12550, 12518, 12485, 12453, 12421, + 12389, 12357, 12325, 12294, 12262, 12230, 12199, 12168, 12137, 12106, + 12075, 12044, 12013, 11982, 11952, 11921, 11891, 11860, 11830, 11800, + 11770, 11740, 11710, 11680, 11651, 11621, 11592, 11562, 11533, 11504, + 11475, 11446, 11417, 11388, 11359, 11330, 11302, 11273, 11245, 11217, + 11188, 11160, 11132, 11104, 11076, 11048, 11021, 10993, 10966, 10938, + 10911, 10883, 10856, 10829, 10802, 10775, 10748, 10721, 10695, 10668, + 10641, 10615, 10588, 10562, 10536, 10510, 10484, 10458, 10432, 10406, + 10380, 10354, 10329, 10303, 10278, 10252, 10227, 10202, 10176, 10151, + 10126, 10101, 10076, 10052, 10027, 10002, 9977, 9953, 9929, 9904, + 9880, 9856, 9831, 9807, 9783, 9759, 9735, 9712, 9688, 9664, + 9641, 9617, 9593, 9570, 9547, 9523, 9500, 9477, 9454, 9431, + 9408, 9385, 9362, 9340, 9317, 9294, 9272, 9249, 9227, 9204, + 9182, 9160, 9138, 9116, 9093, 9071, 9050, 9028, 9006, 8984, + 8962, 8941, 8919, 8898, 8876, 8855, 8834, 8812, 8791, 8770, + 8749, 8728, 8707, 8686, 8665, 8644, 8624, 8603, 8582, 8562, + 8541, 8521, 8500, 8480, 8460, 8439, 8419, 8399, 8379, 8359, + 8339, 8319, 8299, 8279, 8260, 8240, 8220, 8201, 8181, 8162, + 8142, 8123, 8104, 8084, 8065, 8046, 8027, 8008, 7989, 7970, + 7951, 7932, 7913, 7895, 7876, 7857, 7839, 7820, 7802, 7783, + 7765, 7746, 7728, 7710, 7692, 7673, 7655, 7637, 7619, 7601, + 7583, 7565, 7547, 7530, 7512, 7494, 7477, 7459, 7441, 7424, + 7406, 7389, 7372, 7354, 7337, 7320, 7303, 7285, 7268, 7251, + 7234, 7217, 7200, 7183, 7167, 7150, 7133, 7116, 7100, 7083, + 7066, 7050, 7033, 7017, 7001, 6984, 6968, 6952, 6935, 6919, + 6903, 6887, 6871, 6855, 6839, 6823, 6807, 6791, 6775, 6759, + 6744, 6728, 6712, 6696, 6681, 6665, 6650, 6634, 6619, 6603, + 6588, 6573, 6557, 6542, 6527, 6512, 6497, 6482, 6466, 6451, + 6436, 6421, 6407, 6392, 6377, 6362, 6347, 6333, 6318, 6303, + 6289, 6274, 6259, 6245, 6230, 6216, 6202, 6187, 6173, 6158, + 6144, 6130, 6116, 6102, 6087, 6073, 6059, 6045, 6031, 6017, + 6003, 5989, 5976, 5962, 5948, 5934, 5920, 5907, 5893, 5879, + 5866, 5852, 5839, 5825, 5812, 5798, 5785, 5772, 5758, 5745, + 5732, 5718, 5705, 5692, 5679, 5666, 5653, 5640, 5627, 5614, + 5601, 5588, 5575, 5562, 5549, 5536, 5523, 5511, 5498, 5485, + 5473, 5460, 5447, 5435, 5422, 5410, 5397, 5385, 5372, 5360, + 5348, 5335, 5323, 5311, 5298, 5286, 5274, 5262, 5250, 5238, + 5225, 5213, 5201, 5189, 5177, 5165, 5154, 5142, 5130, 5118, + 5106, 5094, 5083, 5071, 5059, 5047, 5036, 5024, 5013, 5001, + 4989, 4978, 4966, 4955, 4944, 4932, 4921, 4909, 4898, 4887, + 4875, 4864, 4853, 4842, 4830, 4819, 4808, 4797, 4786, 4775, + 4764, 4753, 4742, 4731, 4720, 4709, 4698, 4687, 4676, 4666, + 4655, 4644, 4633, 4623, 4612, 4601, 4591, 4580, 4569, 4559, + 4548, 4538, 4527, 4517, 4506, 4496, 4485, 4475, 4465, 4454, + 4444, 4434, 4423, 4413, 4403, 4393, 4382, 4372, 4362, 4352, + 4342, 4332, 4322, 4312, 4302, 4292, 4282, 4272, 4262, 4252, + 4242, 4232, 4222, 4213, 4203, 4193, 4183, 4173, 4164, 4154, + 4144, 4135, 4125, 4115, 4106, 4096, 4087, 4077, 4068, 4058, + 4049, 4039, 4030, 4020, 4011, 4002, 3992, 3983, 3974, 3964, + 3955, 3946, 3937, 3927, 3918, 3909, 3900, 3891, 3882, 3872, + 3863, 3854, 3845, 3836, 3827, 3818, 3809, 3800, 3791, 3783, + 3774, 3765, 3756, 3747, 3738, 3729, 3721, 3712, 3703, 3694, + 3686, 3677, 3668, 3660, 3651, 3642, 3634, 3625, 3617, 3608, + 3600, 3591, 3583, 3574, 3566, 3557, 3549, 3540, 3532, 3524, + 3515, 3507, 3499, 3490, 3482, 3474, 3465, 3457, 3449, 3441, + 3433, 3424, 3416, 3408, 3400, 3392, 3384, 3376, 3368, 3360, + 3352, 3344, 3336, 3328, 3320, 3312, 3304, 3296, 3288, 3280, + 3272, 3264, 3256, 3249, 3241, 3233, 3225, 3218, 3210, 3202, + 3194, 3187, 3179, 3171, 3164, 3156, 3148, 3141, 3133, 3126, + 3118, 3111, 3103, 3095, 3088, 3080, 3073, 3066, 3058, 3051, + 3043, 3036, 3028, 3021, 3014, 3006, 2999, 2992, 2984, 2977, + 2970, 2963, 2955, 2948, 2941, 2934, 2927, 2919, 2912, 2905, + 2898, 2891, 2884, 2877, 2870, 2863, 2856, 2848, 2841, 2834, + 2827, 2820, 2814, 2807, 2800, 2793, 2786, 2779, 2772, 2765, + 2758, 2751, 2745, 2738, 2731, 2724, 2717, 2711, 2704, 2697, + 2690, 2684, 2677, 2670, 2664, 2657, 2650, 2644, 2637, 2630, + 2624, 2617, 2611, 2604, 2597, 2591, 2584, 2578, 2571, 2565, + 2558, 2552, 2545, 2539, 2533, 2526, 2520, 2513, 2507, 2501, + 2494, 2488, 2482, 2475, 2469, 2463, 2456, 2450, 2444, 2437, + 2431, 2425, 2419, 2413, 2406, 2400, 2394, 2388, 2382, 2376, + 2369, 2363, 2357, 2351, 2345, 2339, 2333, 2327, 2321, 2315, + 2309, 2303, 2297, 2291, 2285, 2279, 2273, 2267, 2261, 2255, + 2249, 2243, 2237, 2231, 2226, 2220, 2214, 2208, 2202, 2196, + 2191, 2185, 2179, 2173, 2168, 2162, 2156, 2150, 2145, 2139, + 2133, 2127, 2122, 2116, 2110, 2105, 2099, 2094, 2088, 2082, + 2077, 2071, 2066, 2060, 2054, 2049, 2043, 2038, 2032, 2027, + 2021, 2016, 2010, 2005, 1999, 1994, 1989, 1983, 1978, 1972, + 1967, 1961, 1956, 1951, 1945, 1940, 1935, 1929, 1924, 1919, + 1913, 1908, 1903, 1897, 1892, 1887, 1882, 1876, 1871, 1866, + 1861, 1856, 1850, 1845, 1840, 1835, 1830, 1824, 1819, 1814, + 1809, 1804, 1799, 1794, 1789, 1784, 1778, 1773, 1768, 1763, + 1758, 1753, 1748, 1743, 1738, 1733, 1728, 1723, 1718, 1713, + 1708, 1703, 1698, 1694, 1689, 1684, 1679, 1674, 1669, 1664, + 1659, 1654, 1650, 1645, 1640, 1635, 1630, 1625, 1621, 1616, + 1611, 1606, 1601, 1597, 1592, 1587, 1582, 1578, 1573, 1568, + 1564, 1559, 1554, 1550, 1545, 1540, 1536, 1531, 1526, 1522, + 1517, 1512, 1508, 1503, 1499, 1494, 1489, 1485, 1480, 1476, + 1471, 1467, 1462, 1458, 1453, 1448, 1444, 1439, 1435, 1430, + 1426, 1422, 1417, 1413, 1408, 1404, 1399, 1395, 1390, 1386, + 1382, 1377, 1373, 1368, 1364, 1360, 1355, 1351, 1347, 1342, + 1338, 1334, 1329, 1325, 1321, 1316, 1312, 1308, 1304, 1299, + 1295, 1291, 1287, 1282, 1278, 1274, 1270, 1265, 1261, 1257, + 1253, 1249, 1245, 1240, 1236, 1232, 1228, 1224, 1220, 1215, + 1211, 1207, 1203, 1199, 1195, 1191, 1187, 1183, 1179, 1174, + 1170, 1166, 1162, 1158, 1154, 1150, 1146, 1142, 1138, 1134, + 1130, 1126, 1122, 1118, 1114, 1110, 1106, 1102, 1098, 1095, + 1091, 1087, 1083, 1079, 1075, 1071, 1067, 1063, 1059, 1055, + 1052, 1048, 1044, 1040, 1036, 1032, 1029, 1025, 1021, 1017, + 1013, 1009, 1006, 1002, 998, 994, 991, 987, 983, 979, + 975, 972, 968, 964, 961, 957, 953, 949, 946, 942, + 938, 935, 931, 927, 924, 920, 916, 913, 909, 905, + 902, 898, 894, 891, 887, 884, 880, 876, 873, 869, + 866, 862, 859, 855, 851, 848, 844, 841, 837, 834, + 830, 827, 823, 820, 816, 813, 809, 806, 802, 799, + 795, 792, 788, 785, 781, 778, 774, 771, 768, 764, + 761, 757, 754, 751, 747, 744, 740, 737, 734, 730, + 727, 723, 720, 717, 713, 710, 707, 703, 700, 697, + 693, 690, 687, 684, 680, 677, 674, 670, 667, 664, + 661, 657, 654, 651, 648, 644, 641, 638, 635, 631, + 628, 625, 622, 618, 615, 612, 609, 606, 603, 599, + 596, 593, 590, 587, 584, 580, 577, 574, 571, 568, + 565, 562, 558, 555, 552, 549, 546, 543, 540, 537, + 534, 531, 528, 524, 521, 518, 515, 512, 509, 506, + 503, 500, 497, 494, 491, 488, 485, 482, 479, 476, + 473, 470, 467, 464, 461, 458, 455, 452, 449, 446, + 443, 440, 437, 435, 432, 429, 426, 423, 420, 417, + 414, 411, 408, 405, 402, 400, 397, 394, 391, 388, + 385, 382, 380, 377, 374, 371, 368, 365, 362, 360, + 357, 354, 351, 348, 346, 343, 340, 337, 334, 332, + 329, 326, 323, 320, 318, 315, 312, 309, 307, 304, + 301, 298, 296, 293, 290, 287, 285, 282, 279, 277, + 274, 271, 268, 266, 263, 260, 258, 255, 252, 250, + 247, 244, 242, 239, 236, 234, 231, 228, 226, 223, + 220, 218, 215, 213, 210, 207, 205, 202, 200, 197, + 194, 192, 189, 187, 184, 181, 179, 176, 174, 171, + 169, 166, 163, 161, 158, 156, 153, 151, 148, 146, + 143, 141, 138, 136, 133, 131, 128, 126, 123, 121, + 118, 116, 113, 111, 108, 106, 103, 101, 98, 96, + 93, 91, 88, 86, 84, 81, 79, 76, 74, 71, + 69, 67, 64, 62, 59, 57, 54, 52, 50, 47, + 45, 42, 40, 38, 35, 33, 31, 28, 26, 23, + 21, 19, 16, 14, 12, 9, 7, 5, 2, 0, + 0, -2, -5, -7, -9, -12, -14, -16, -19, -21, + -23, -26, -28, -31, -33, -35, -38, -40, -42, -45, + -47, -50, -52, -54, -57, -59, -62, -64, -67, -69, + -71, -74, -76, -79, -81, -84, -86, -88, -91, -93, + -96, -98, -101, -103, -106, -108, -111, -113, -116, -118, + -121, -123, -126, -128, -131, -133, -136, -138, -141, -143, + -146, -148, -151, -153, -156, -158, -161, -163, -166, -169, + -171, -174, -176, -179, -181, -184, -187, -189, -192, -194, + -197, -200, -202, -205, -207, -210, -213, -215, -218, -220, + -223, -226, -228, -231, -234, -236, -239, -242, -244, -247, + -250, -252, -255, -258, -260, -263, -266, -268, -271, -274, + -277, -279, -282, -285, -287, -290, -293, -296, -298, -301, + -304, -307, -309, -312, -315, -318, -320, -323, -326, -329, + -332, -334, -337, -340, -343, -346, -348, -351, -354, -357, + -360, -362, -365, -368, -371, -374, -377, -380, -382, -385, + -388, -391, -394, -397, -400, -402, -405, -408, -411, -414, + -417, -420, -423, -426, -429, -432, -435, -437, -440, -443, + -446, -449, -452, -455, -458, -461, -464, -467, -470, -473, + -476, -479, -482, -485, -488, -491, -494, -497, -500, -503, + -506, -509, -512, -515, -518, -521, -524, -528, -531, -534, + -537, -540, -543, -546, -549, -552, -555, -558, -562, -565, + -568, -571, -574, -577, -580, -584, -587, -590, -593, -596, + -599, -603, -606, -609, -612, -615, -618, -622, -625, -628, + -631, -635, -638, -641, -644, -648, -651, -654, -657, -661, + -664, -667, -670, -674, -677, -680, -684, -687, -690, -693, + -697, -700, -703, -707, -710, -713, -717, -720, -723, -727, + -730, -734, -737, -740, -744, -747, -751, -754, -757, -761, + -764, -768, -771, -774, -778, -781, -785, -788, -792, -795, + -799, -802, -806, -809, -813, -816, -820, -823, -827, -830, + -834, -837, -841, -844, -848, -851, -855, -859, -862, -866, + -869, -873, -876, -880, -884, -887, -891, -894, -898, -902, + -905, -909, -913, -916, -920, -924, -927, -931, -935, -938, + -942, -946, -949, -953, -957, -961, -964, -968, -972, -975, + -979, -983, -987, -991, -994, -998, -1002, -1006, -1009, -1013, + -1017, -1021, -1025, -1029, -1032, -1036, -1040, -1044, -1048, -1052, + -1055, -1059, -1063, -1067, -1071, -1075, -1079, -1083, -1087, -1091, + -1095, -1098, -1102, -1106, -1110, -1114, -1118, -1122, -1126, -1130, + -1134, -1138, -1142, -1146, -1150, -1154, -1158, -1162, -1166, -1170, + -1174, -1179, -1183, -1187, -1191, -1195, -1199, -1203, -1207, -1211, + -1215, -1220, -1224, -1228, -1232, -1236, -1240, -1245, -1249, -1253, + -1257, -1261, -1265, -1270, -1274, -1278, -1282, -1287, -1291, -1295, + -1299, -1304, -1308, -1312, -1316, -1321, -1325, -1329, -1334, -1338, + -1342, -1347, -1351, -1355, -1360, -1364, -1368, -1373, -1377, -1382, + -1386, -1390, -1395, -1399, -1404, -1408, -1413, -1417, -1422, -1426, + -1430, -1435, -1439, -1444, -1448, -1453, -1458, -1462, -1467, -1471, + -1476, -1480, -1485, -1489, -1494, -1499, -1503, -1508, -1512, -1517, + -1522, -1526, -1531, -1536, -1540, -1545, -1550, -1554, -1559, -1564, + -1568, -1573, -1578, -1582, -1587, -1592, -1597, -1601, -1606, -1611, + -1616, -1621, -1625, -1630, -1635, -1640, -1645, -1650, -1654, -1659, + -1664, -1669, -1674, -1679, -1684, -1689, -1694, -1698, -1703, -1708, + -1713, -1718, -1723, -1728, -1733, -1738, -1743, -1748, -1753, -1758, + -1763, -1768, -1773, -1778, -1784, -1789, -1794, -1799, -1804, -1809, + -1814, -1819, -1824, -1830, -1835, -1840, -1845, -1850, -1856, -1861, + -1866, -1871, -1876, -1882, -1887, -1892, -1897, -1903, -1908, -1913, + -1919, -1924, -1929, -1935, -1940, -1945, -1951, -1956, -1961, -1967, + -1972, -1978, -1983, -1989, -1994, -1999, -2005, -2010, -2016, -2021, + -2027, -2032, -2038, -2043, -2049, -2054, -2060, -2066, -2071, -2077, + -2082, -2088, -2094, -2099, -2105, -2110, -2116, -2122, -2127, -2133, + -2139, -2145, -2150, -2156, -2162, -2168, -2173, -2179, -2185, -2191, + -2196, -2202, -2208, -2214, -2220, -2226, -2231, -2237, -2243, -2249, + -2255, -2261, -2267, -2273, -2279, -2285, -2291, -2297, -2303, -2309, + -2315, -2321, -2327, -2333, -2339, -2345, -2351, -2357, -2363, -2369, + -2376, -2382, -2388, -2394, -2400, -2406, -2413, -2419, -2425, -2431, + -2437, -2444, -2450, -2456, -2463, -2469, -2475, -2482, -2488, -2494, + -2501, -2507, -2513, -2520, -2526, -2533, -2539, -2545, -2552, -2558, + -2565, -2571, -2578, -2584, -2591, -2597, -2604, -2611, -2617, -2624, + -2630, -2637, -2644, -2650, -2657, -2664, -2670, -2677, -2684, -2690, + -2697, -2704, -2711, -2717, -2724, -2731, -2738, -2745, -2751, -2758, + -2765, -2772, -2779, -2786, -2793, -2800, -2807, -2814, -2820, -2827, + -2834, -2841, -2848, -2856, -2863, -2870, -2877, -2884, -2891, -2898, + -2905, -2912, -2919, -2927, -2934, -2941, -2948, -2955, -2963, -2970, + -2977, -2984, -2992, -2999, -3006, -3014, -3021, -3028, -3036, -3043, + -3051, -3058, -3066, -3073, -3080, -3088, -3095, -3103, -3111, -3118, + -3126, -3133, -3141, -3148, -3156, -3164, -3171, -3179, -3187, -3194, + -3202, -3210, -3218, -3225, -3233, -3241, -3249, -3256, -3264, -3272, + -3280, -3288, -3296, -3304, -3312, -3320, -3328, -3336, -3344, -3352, + -3360, -3368, -3376, -3384, -3392, -3400, -3408, -3416, -3424, -3433, + -3441, -3449, -3457, -3465, -3474, -3482, -3490, -3499, -3507, -3515, + -3524, -3532, -3540, -3549, -3557, -3566, -3574, -3583, -3591, -3600, + -3608, -3617, -3625, -3634, -3642, -3651, -3660, -3668, -3677, -3686, + -3694, -3703, -3712, -3721, -3729, -3738, -3747, -3756, -3765, -3774, + -3783, -3791, -3800, -3809, -3818, -3827, -3836, -3845, -3854, -3863, + -3872, -3882, -3891, -3900, -3909, -3918, -3927, -3937, -3946, -3955, + -3964, -3974, -3983, -3992, -4002, -4011, -4020, -4030, -4039, -4049, + -4058, -4068, -4077, -4087, -4096, -4106, -4115, -4125, -4135, -4144, + -4154, -4164, -4173, -4183, -4193, -4203, -4213, -4222, -4232, -4242, + -4252, -4262, -4272, -4282, -4292, -4302, -4312, -4322, -4332, -4342, + -4352, -4362, -4372, -4382, -4393, -4403, -4413, -4423, -4434, -4444, + -4454, -4465, -4475, -4485, -4496, -4506, -4517, -4527, -4538, -4548, + -4559, -4569, -4580, -4591, -4601, -4612, -4623, -4633, -4644, -4655, + -4666, -4676, -4687, -4698, -4709, -4720, -4731, -4742, -4753, -4764, + -4775, -4786, -4797, -4808, -4819, -4830, -4842, -4853, -4864, -4875, + -4887, -4898, -4909, -4921, -4932, -4944, -4955, -4966, -4978, -4989, + -5001, -5013, -5024, -5036, -5047, -5059, -5071, -5083, -5094, -5106, + -5118, -5130, -5142, -5154, -5165, -5177, -5189, -5201, -5213, -5225, + -5238, -5250, -5262, -5274, -5286, -5298, -5311, -5323, -5335, -5348, + -5360, -5372, -5385, -5397, -5410, -5422, -5435, -5447, -5460, -5473, + -5485, -5498, -5511, -5523, -5536, -5549, -5562, -5575, -5588, -5601, + -5614, -5627, -5640, -5653, -5666, -5679, -5692, -5705, -5718, -5732, + -5745, -5758, -5772, -5785, -5798, -5812, -5825, -5839, -5852, -5866, + -5879, -5893, -5907, -5920, -5934, -5948, -5962, -5976, -5989, -6003, + -6017, -6031, -6045, -6059, -6073, -6087, -6102, -6116, -6130, -6144, + -6158, -6173, -6187, -6202, -6216, -6230, -6245, -6259, -6274, -6289, + -6303, -6318, -6333, -6347, -6362, -6377, -6392, -6407, -6421, -6436, + -6451, -6466, -6482, -6497, -6512, -6527, -6542, -6557, -6573, -6588, + -6603, -6619, -6634, -6650, -6665, -6681, -6696, -6712, -6728, -6744, + -6759, -6775, -6791, -6807, -6823, -6839, -6855, -6871, -6887, -6903, + -6919, -6935, -6952, -6968, -6984, -7001, -7017, -7033, -7050, -7066, + -7083, -7100, -7116, -7133, -7150, -7167, -7183, -7200, -7217, -7234, + -7251, -7268, -7285, -7303, -7320, -7337, -7354, -7372, -7389, -7406, + -7424, -7441, -7459, -7477, -7494, -7512, -7530, -7547, -7565, -7583, + -7601, -7619, -7637, -7655, -7673, -7692, -7710, -7728, -7746, -7765, + -7783, -7802, -7820, -7839, -7857, -7876, -7895, -7913, -7932, -7951, + -7970, -7989, -8008, -8027, -8046, -8065, -8084, -8104, -8123, -8142, + -8162, -8181, -8201, -8220, -8240, -8260, -8279, -8299, -8319, -8339, + -8359, -8379, -8399, -8419, -8439, -8460, -8480, -8500, -8521, -8541, + -8562, -8582, -8603, -8624, -8644, -8665, -8686, -8707, -8728, -8749, + -8770, -8791, -8812, -8834, -8855, -8876, -8898, -8919, -8941, -8962, + -8984, -9006, -9028, -9050, -9071, -9093, -9116, -9138, -9160, -9182, + -9204, -9227, -9249, -9272, -9294, -9317, -9340, -9362, -9385, -9408, + -9431, -9454, -9477, -9500, -9523, -9547, -9570, -9593, -9617, -9641, + -9664, -9688, -9712, -9735, -9759, -9783, -9807, -9831, -9856, -9880, + -9904, -9929, -9953, -9977, -10002, -10027, -10052, -10076, -10101, -10126, + -10151, -10176, -10202, -10227, -10252, -10278, -10303, -10329, -10354, -10380, + -10406, -10432, -10458, -10484, -10510, -10536, -10562, -10588, -10615, -10641, + -10668, -10695, -10721, -10748, -10775, -10802, -10829, -10856, -10883, -10911, + -10938, -10966, -10993, -11021, -11048, -11076, -11104, -11132, -11160, -11188, + -11217, -11245, -11273, -11302, -11330, -11359, -11388, -11417, -11446, -11475, + -11504, -11533, -11562, -11592, -11621, -11651, -11680, -11710, -11740, -11770, + -11800, -11830, -11860, -11891, -11921, -11952, -11982, -12013, -12044, -12075, + -12106, -12137, -12168, -12199, -12230, -12262, -12294, -12325, -12357, -12389, + -12421, -12453, -12485, -12518, -12550, -12582, -12615, -12648, -12681, -12714, + -12747, -12780, -12813, -12846, -12880, -12913, -12947, -12981, -13015, -13049, + -13083, -13117, -13152, -13186, -13221, -13255, -13290, -13325, -13360, -13395, + -13431, -13466, -13501, -13537, -13573, -13609, -13645, -13681, -13717, -13753, + -13790, -13826, -13863, -13900, -13937, -13974, -14011, -14048, -14086, -14123, + -14161, -14199, -14237, -14275, -14313, -14352, -14390, -14429, -14467, -14506, + -14545, -14584, -14624, -14663, -14703, -14742, -14782, -14822, -14862, -14902, + -14943, -14983, -15024, -15065, -15106, -15147, -15188, -15229, -15271, -15312, + -15354, -15396, -15438, -15480, -15523, -15565, -15608, -15651, -15694, -15737, + -15780, -15824, -15867, -15911, -15955, -15999, -16043, -16088, -16132, -16177, + -16222, -16267, -16312, -16357, -16403, -16448, -16494, -16540, -16586, -16633, + -16679, -16726, -16773, -16820, -16867, -16914, -16962, -17009, -17057, -17105, + -17153, -17202, -17250, -17299, -17348, -17397, -17446, -17496, -17546, -17595, + -17645, -17696, -17746, -17797, -17847, -17898, -17950, -18001, -18052, -18104, + -18156, -18208, -18261, -18313, -18366, -18419, -18472, -18525, -18579, -18632, + -18686, -18740, -18795, -18849, -18904, -18959, -19014, -19070, -19125, -19181, + -19237, -19293, -19350, -19406, -19463, -19520, -19578, -19635, -19693, -19751, + -19809, -19868, -19927, -19986, -20045, -20104, -20164, -20224, -20284, -20344, + -20405, -20465, -20526, -20588, -20649, -20711, -20773, -20835, -20898, -20961, + -21024, -21087, -21151, -21214, -21278, -21343, -21407, -21472, -21537, -21603, + -21668, -21734, -21800, -21867, -21933, -22000, -22068, -22135, -22203, -22271, + -22339, -22408, -22477, -22546, -22616, -22685, -22756, -22826, -22897, -22968, + -23039, -23110, -23182, -23254, -23327, -23400, -23473, -23546, -23620, -23694, + -23768, -23843, -23918, -23993, -24068, -24144, -24221, -24297, -24374, -24451, + -24529, -24607, -24685, -24763, -24842, -24921, -25001, -25081, -25161, -25242, + -25323, -25404, -25486, -25568, -25650, -25733, -25816, -25900, -25983, -26068, + -26152, -26237, -26323, -26408, -26494, -26581, -26668, -26755, -26843, -26931, + -27019, -27108, -27197, -27287, -27377, -27468, -27558, -27650, -27741, -27833, + -27926, -28019, -28112, -28206, -28300, -28395, -28490, -28586, -28682, -28778, + -28875, -28972, -29070, -29168, -29267, -29366, -29466, -29566, -29666, -29767, + -29869, -29971, -30073, -30176, -30280, -30384, -30488, -30593, -30698, -30804, + -30911, -31018, -31125, -31233, -31341, -31450, -31560, -31670, -31780, -31892, + -32003, -32115, -32228, -32341, -32455, -32570, -32685, -32800, -32916, -33033, + -33150, -33268, -33386, -33505, -33625, -33745, -33866, -33987, -34109, -34232, + -34355, -34479, -34603, -34728, -34854, -34980, -35107, -35235, -35363, -35492, + -35622, -35752, -35883, -36015, -36147, -36280, -36413, -36548, -36683, -36818, + -36955, -37092, -37230, -37368, -37508, -37648, -37788, -37930, -38072, -38215, + -38359, -38503, -38648, -38794, -38941, -39089, -39237, -39386, -39536, -39687, + -39839, -39991, -40144, -40298, -40453, -40609, -40765, -40923, -41081, -41240, + -41400, -41561, -41723, -41886, -42049, -42214, -42379, -42545, -42712, -42881, + -43050, -43220, -43391, -43563, -43735, -43909, -44084, -44260, -44437, -44615, + -44794, -44973, -45154, -45336, -45519, -45703, -45888, -46074, -46262, -46450, + -46639, -46830, -47021, -47214, -47408, -47603, -47799, -47996, -48194, -48394, + -48595, -48797, -49000, -49204, -49410, -49616, -49824, -50034, -50244, -50456, + -50669, -50883, -51099, -51316, -51534, -51754, -51975, -52197, -52421, -52646, + -52872, -53100, -53329, -53560, -53792, -54025, -54260, -54496, -54734, -54974, + -55215, -55457, -55701, -55946, -56193, -56442, -56692, -56944, -57197, -57452, + -57709, -57967, -58227, -58488, -58752, -59016, -59283, -59552, -59822, -60094, + -60367, -60643, -60920, -61199, -61480, -61763, -62048, -62335, -62623, -62914, +}; diff --git a/software/include/variants.h b/software/include/variants.h new file mode 100644 index 0000000..c268d0b --- /dev/null +++ b/software/include/variants.h @@ -0,0 +1,8 @@ +#ifndef __VARIANTS_H__ +#define __VARIANTS_H__ + +/// Define either MECHADUINO or MOTEUS +// #define MECHADUINO 1 +#define MOTEUS 1 + +#endif diff --git a/software/lib/README b/software/lib/README new file mode 100644 index 0000000..6debab1 --- /dev/null +++ b/software/lib/README @@ -0,0 +1,46 @@ + +This directory is intended for project specific (private) libraries. +PlatformIO will compile them to static libraries and link into executable file. + +The source code of each library should be placed in a an own separate directory +("lib/your_library_name/[here are source files]"). + +For example, see a structure of the following two libraries `Foo` and `Bar`: + +|--lib +| | +| |--Bar +| | |--docs +| | |--examples +| | |--src +| | |- Bar.c +| | |- Bar.h +| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html +| | +| |--Foo +| | |- Foo.c +| | |- Foo.h +| | +| |- README --> THIS FILE +| +|- platformio.ini +|--src + |- main.c + +and a contents of `src/main.c`: +``` +#include +#include + +int main (void) +{ + ... +} + +``` + +PlatformIO Library Dependency Finder will find automatically dependent +libraries scanning project source files. + +More information about PlatformIO Library Dependency Finder +- https://docs.platformio.org/page/librarymanager/ldf.html diff --git a/software/libmapper_arduino b/software/libmapper_arduino deleted file mode 160000 index 3c14aee..0000000 --- a/software/libmapper_arduino +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3c14aee5434cc7f94996a73b62e40965fbc628eb diff --git a/software/min_spiffs.csv b/software/min_spiffs.csv new file mode 100644 index 0000000..9e503a8 --- /dev/null +++ b/software/min_spiffs.csv @@ -0,0 +1,6 @@ +# Name, Type, SubType, Offset, Size, Flags +nvs, data, nvs, 0x9000, 20K, +otadata, data, ota, 0xe000, 8K, +app0, app, ota_0, 0x10000, 1920K, +app1, app, ota_1, 0x1F0000,1920K, +spiffs, data, spiffs, 0x3D0000,192K, \ No newline at end of file diff --git a/software/min_spiffs_no_OTA.csv b/software/min_spiffs_no_OTA.csv new file mode 100644 index 0000000..a871f09 --- /dev/null +++ b/software/min_spiffs_no_OTA.csv @@ -0,0 +1,5 @@ +# Name, Type, SubType, Offset, Size, Flags +nvs, data, nvs, 0x9000, 20K, +otadata, data, ota, 0xe000, 8K, +app0, app, ota_0, 0x10000, 3840K, +spiffs, data, spiffs, 0x3D0000,192K, \ No newline at end of file diff --git a/software/platformio.ini b/software/platformio.ini new file mode 100644 index 0000000..85b2977 --- /dev/null +++ b/software/platformio.ini @@ -0,0 +1,58 @@ +; PlatformIO Project Configuration File +; +; Build options: build flags, source filter +; Upload options: custom upload port, speed and extra flags +; Library options: dependencies, extra library storages +; Advanced options: extra scripting +; +; Please visit documentation for the other options and examples +; https://docs.platformio.org/page/projectconf.html +[common] +lib_deps = + tinypico/TinyPICO Helper Library@^1.4.0 + https://github.com/adafruit/Adafruit-RGB-LCD-Shield-Library.git + https://github.com/arkhipenko/TaskScheduler.git + https://github.com/Puara/puara-gestures.git + https://github.com/mathiasbredholt/libmapper-arduino.git#v0.3 + https://github.com/Puara/puara-module.git +build_flags = + -DCONFIG_ARDUINO_LOOP_STACK_SIZE=32768 + -D _TASK_MICRO_RES + +[env:tinypico] +platform = espressif32 +board = tinypico +framework = arduino +build_unflags = -Werror=reorder +build_flags = + -DBOARD_HAS_PSRAM + -mfix-esp32-psram-cache-issue + ${common.build_flags} +board_build.partitions = min_spiffs_no_OTA.csv +monitor_speed = 115200 +monitor_flags = + --filter + send_on_enter + --echo +monitor_filters = esp32_exception_decoder +lib_deps = + ${common.lib_deps} + +[env:esp32thing_plus] +platform = espressif32 +board = esp32thing_plus +framework = arduino +build_unflags = -Werror=reorder +build_flags = + -DBOARD_HAS_PSRAM + -mfix-esp32-psram-cache-issue + ${common.build_flags} +board_build.partitions = min_spiffs_no_OTA.csv +monitor_speed = 115200 +monitor_flags = + --filter + send_on_enter + --echo +monitor_filters = esp32_exception_decoder +lib_deps = + ${common.lib_deps} diff --git a/software/sdkconfig b/software/sdkconfig new file mode 100644 index 0000000..48973e8 --- /dev/null +++ b/software/sdkconfig @@ -0,0 +1,1161 @@ +# +# Automatically generated file. DO NOT EDIT. +# Espressif IoT Development Framework (ESP-IDF) Project Configuration +# +CONFIG_IDF_CMAKE=y +CONFIG_IDF_TARGET="esp32" +CONFIG_IDF_TARGET_ESP32=y +CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000 + +# +# SDK tool configuration +# +CONFIG_SDK_TOOLPREFIX="xtensa-esp32-elf-" +# CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS is not set +# end of SDK tool configuration + +# +# Build type +# +CONFIG_APP_BUILD_TYPE_APP_2NDBOOT=y +# CONFIG_APP_BUILD_TYPE_ELF_RAM is not set +CONFIG_APP_BUILD_GENERATE_BINARIES=y +CONFIG_APP_BUILD_BOOTLOADER=y +CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y +# end of Build type + +# +# Application manager +# +CONFIG_APP_COMPILE_TIME_DATE=y +# CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set +# CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set +# CONFIG_APP_PROJECT_VER_FROM_CONFIG is not set +CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16 +# end of Application manager + +# +# Bootloader config +# +CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_NONE is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set +CONFIG_BOOTLOADER_LOG_LEVEL_INFO=y +# CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set +CONFIG_BOOTLOADER_LOG_LEVEL=3 +# CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V is not set +CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y +# CONFIG_BOOTLOADER_FACTORY_RESET is not set +# CONFIG_BOOTLOADER_APP_TEST is not set +CONFIG_BOOTLOADER_WDT_ENABLE=y +# CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set +CONFIG_BOOTLOADER_WDT_TIME_MS=9000 +# CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set +# CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP is not set +CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0 +# CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC is not set +# end of Bootloader config + +# +# Security features +# +# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set +# CONFIG_SECURE_BOOT is not set +# CONFIG_SECURE_FLASH_ENC_ENABLED is not set +# end of Security features + +# +# Serial flasher config +# +CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 +CONFIG_ESPTOOLPY_WITH_STUB=y +# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set +CONFIG_ESPTOOLPY_FLASHMODE_DIO=y +# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set +CONFIG_ESPTOOLPY_FLASHMODE="dio" +# CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set +CONFIG_ESPTOOLPY_FLASHFREQ_40M=y +# CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set +CONFIG_ESPTOOLPY_FLASHFREQ="40m" +# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set +CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y +# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set +CONFIG_ESPTOOLPY_FLASHSIZE="2MB" +CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y +CONFIG_ESPTOOLPY_BEFORE_RESET=y +# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set +CONFIG_ESPTOOLPY_BEFORE="default_reset" +CONFIG_ESPTOOLPY_AFTER_RESET=y +# CONFIG_ESPTOOLPY_AFTER_NORESET is not set +CONFIG_ESPTOOLPY_AFTER="hard_reset" +# CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set +CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y +# CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set +CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200 +CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 +# end of Serial flasher config + +# +# Partition Table +# +CONFIG_PARTITION_TABLE_SINGLE_APP=y +# CONFIG_PARTITION_TABLE_TWO_OTA is not set +# CONFIG_PARTITION_TABLE_CUSTOM is not set +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" +CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" +CONFIG_PARTITION_TABLE_OFFSET=0x8000 +CONFIG_PARTITION_TABLE_MD5=y +# end of Partition Table + +# +# Compiler options +# +CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y +# CONFIG_COMPILER_OPTIMIZATION_SIZE is not set +# CONFIG_COMPILER_OPTIMIZATION_PERF is not set +# CONFIG_COMPILER_OPTIMIZATION_NONE is not set +CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y +# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set +# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set +# CONFIG_COMPILER_CXX_EXCEPTIONS is not set +# CONFIG_COMPILER_CXX_RTTI is not set +CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y +# CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set +# CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set +# CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set +# CONFIG_COMPILER_WARN_WRITE_STRINGS is not set +# CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set +# end of Compiler options + +# +# Component config +# + +# +# Application Level Tracing +# +# CONFIG_APPTRACE_DEST_TRAX is not set +CONFIG_APPTRACE_DEST_NONE=y +CONFIG_APPTRACE_LOCK_ENABLE=y +# end of Application Level Tracing + +# +# Bluetooth +# +# CONFIG_BT_ENABLED is not set +CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0 +CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0 +CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0 +CONFIG_BTDM_CTRL_BLE_MAX_CONN_EFF=0 +CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN_EFF=0 +CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF=0 +CONFIG_BTDM_CTRL_PINNED_TO_CORE=0 +CONFIG_BTDM_BLE_SLEEP_CLOCK_ACCURACY_INDEX_EFF=1 +CONFIG_BT_RESERVE_DRAM=0 +# end of Bluetooth + +# +# CoAP Configuration +# +CONFIG_COAP_MBEDTLS_PSK=y +# CONFIG_COAP_MBEDTLS_PKI is not set +# CONFIG_COAP_MBEDTLS_DEBUG is not set +CONFIG_COAP_LOG_DEFAULT_LEVEL=0 +# end of CoAP Configuration + +# +# Driver configurations +# + +# +# ADC configuration +# +# CONFIG_ADC_FORCE_XPD_FSM is not set +CONFIG_ADC_DISABLE_DAC=y +# end of ADC configuration + +# +# SPI configuration +# +# CONFIG_SPI_MASTER_IN_IRAM is not set +CONFIG_SPI_MASTER_ISR_IN_IRAM=y +# CONFIG_SPI_SLAVE_IN_IRAM is not set +CONFIG_SPI_SLAVE_ISR_IN_IRAM=y +# end of SPI configuration + +# +# UART configuration +# +# CONFIG_UART_ISR_IN_IRAM is not set +# end of UART configuration + +# +# RTCIO configuration +# +# CONFIG_RTCIO_SUPPORT_RTC_GPIO_DESC is not set +# end of RTCIO configuration +# end of Driver configurations + +# +# eFuse Bit Manager +# +# CONFIG_EFUSE_CUSTOM_TABLE is not set +# CONFIG_EFUSE_VIRTUAL is not set +# CONFIG_EFUSE_CODE_SCHEME_COMPAT_NONE is not set +CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4=y +# CONFIG_EFUSE_CODE_SCHEME_COMPAT_REPEAT is not set +CONFIG_EFUSE_MAX_BLK_LEN=192 +# end of eFuse Bit Manager + +# +# ESP-TLS +# +CONFIG_ESP_TLS_USING_MBEDTLS=y +# CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set +# CONFIG_ESP_TLS_SERVER is not set +# CONFIG_ESP_TLS_PSK_VERIFICATION is not set +# end of ESP-TLS + +# +# ESP32-specific +# +CONFIG_ESP32_REV_MIN_0=y +# CONFIG_ESP32_REV_MIN_1 is not set +# CONFIG_ESP32_REV_MIN_2 is not set +# CONFIG_ESP32_REV_MIN_3 is not set +CONFIG_ESP32_REV_MIN=0 +CONFIG_ESP32_DPORT_WORKAROUND=y +# CONFIG_ESP32_DEFAULT_CPU_FREQ_80 is not set +CONFIG_ESP32_DEFAULT_CPU_FREQ_160=y +# CONFIG_ESP32_DEFAULT_CPU_FREQ_240 is not set +CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=160 +# CONFIG_ESP32_SPIRAM_SUPPORT is not set +# CONFIG_ESP32_TRAX is not set +CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0x0 +# CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_TWO is not set +CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR=y +CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES=4 +# CONFIG_ESP32_ULP_COPROC_ENABLED is not set +CONFIG_ESP32_ULP_COPROC_RESERVE_MEM=0 +CONFIG_ESP32_DEBUG_OCDAWARE=y +CONFIG_ESP32_BROWNOUT_DET=y +CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_0=y +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_1 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_2 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_3 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_4 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_5 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_6 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_7 is not set +CONFIG_ESP32_BROWNOUT_DET_LVL=0 +CONFIG_ESP32_REDUCE_PHY_TX_POWER=y +CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y +# CONFIG_ESP32_TIME_SYSCALL_USE_RTC is not set +# CONFIG_ESP32_TIME_SYSCALL_USE_FRC1 is not set +# CONFIG_ESP32_TIME_SYSCALL_USE_NONE is not set +CONFIG_ESP32_RTC_CLK_SRC_INT_RC=y +# CONFIG_ESP32_RTC_CLK_SRC_EXT_CRYS is not set +# CONFIG_ESP32_RTC_CLK_SRC_EXT_OSC is not set +# CONFIG_ESP32_RTC_CLK_SRC_INT_8MD256 is not set +CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024 +CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000 +CONFIG_ESP32_XTAL_FREQ_40=y +# CONFIG_ESP32_XTAL_FREQ_26 is not set +# CONFIG_ESP32_XTAL_FREQ_AUTO is not set +CONFIG_ESP32_XTAL_FREQ=40 +# CONFIG_ESP32_DISABLE_BASIC_ROM_CONSOLE is not set +# CONFIG_ESP32_NO_BLOBS is not set +# CONFIG_ESP32_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set +# CONFIG_ESP32_USE_FIXED_STATIC_RAM_SIZE is not set +CONFIG_ESP32_DPORT_DIS_INTERRUPT_LVL=5 +# end of ESP32-specific + +# +# Power Management +# +# CONFIG_PM_ENABLE is not set +# end of Power Management + +# +# ADC-Calibration +# +CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y +CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y +CONFIG_ADC_CAL_LUT_ENABLE=y +# end of ADC-Calibration + +# +# Common ESP-related +# +CONFIG_ESP_ERR_TO_NAME_LOOKUP=y +CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 +CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2304 +CONFIG_ESP_MAIN_TASK_STACK_SIZE=3584 +CONFIG_ESP_IPC_TASK_STACK_SIZE=1024 +CONFIG_ESP_IPC_USES_CALLERS_PRIORITY=y +CONFIG_ESP_MINIMAL_SHARED_STACK_SIZE=2048 +CONFIG_ESP_CONSOLE_UART_DEFAULT=y +# CONFIG_ESP_CONSOLE_UART_CUSTOM is not set +# CONFIG_ESP_CONSOLE_UART_NONE is not set +CONFIG_ESP_CONSOLE_UART_NUM=0 +CONFIG_ESP_CONSOLE_UART_TX_GPIO=1 +CONFIG_ESP_CONSOLE_UART_RX_GPIO=3 +CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 +CONFIG_ESP_INT_WDT=y +CONFIG_ESP_INT_WDT_TIMEOUT_MS=300 +CONFIG_ESP_INT_WDT_CHECK_CPU1=y +CONFIG_ESP_TASK_WDT=y +# CONFIG_ESP_TASK_WDT_PANIC is not set +CONFIG_ESP_TASK_WDT_TIMEOUT_S=5 +CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=y +CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1=y +# CONFIG_ESP_PANIC_HANDLER_IRAM is not set +CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_STA=y +CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_AP=y +CONFIG_ESP_MAC_ADDR_UNIVERSE_BT=y +CONFIG_ESP_MAC_ADDR_UNIVERSE_BT_OFFSET=2 +CONFIG_ESP_MAC_ADDR_UNIVERSE_ETH=y +# end of Common ESP-related + +# +# Ethernet +# +CONFIG_ETH_ENABLED=y +CONFIG_ETH_USE_ESP32_EMAC=y +CONFIG_ETH_PHY_INTERFACE_RMII=y +# CONFIG_ETH_PHY_INTERFACE_MII is not set +CONFIG_ETH_RMII_CLK_INPUT=y +# CONFIG_ETH_RMII_CLK_OUTPUT is not set +CONFIG_ETH_RMII_CLK_IN_GPIO=0 +CONFIG_ETH_DMA_BUFFER_SIZE=512 +CONFIG_ETH_DMA_RX_BUFFER_NUM=10 +CONFIG_ETH_DMA_TX_BUFFER_NUM=10 +CONFIG_ETH_USE_SPI_ETHERNET=y +# CONFIG_ETH_SPI_ETHERNET_DM9051 is not set +# CONFIG_ETH_USE_OPENETH is not set +# end of Ethernet + +# +# Event Loop Library +# +# CONFIG_ESP_EVENT_LOOP_PROFILING is not set +CONFIG_ESP_EVENT_POST_FROM_ISR=y +CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y +# end of Event Loop Library + +# +# GDB Stub +# +# end of GDB Stub + +# +# ESP HTTP client +# +CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y +# CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH is not set +# end of ESP HTTP client + +# +# HTTP Server +# +CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 +CONFIG_HTTPD_MAX_URI_LEN=512 +CONFIG_HTTPD_ERR_RESP_NO_DELAY=y +CONFIG_HTTPD_PURGE_BUF_LEN=32 +# CONFIG_HTTPD_LOG_PURGE_DATA is not set +# CONFIG_HTTPD_WS_SUPPORT is not set +# end of HTTP Server + +# +# ESP HTTPS OTA +# +# CONFIG_OTA_ALLOW_HTTP is not set +# end of ESP HTTPS OTA + +# +# ESP HTTPS server +# +# CONFIG_ESP_HTTPS_SERVER_ENABLE is not set +# end of ESP HTTPS server + +# +# ESP NETIF Adapter +# +CONFIG_ESP_NETIF_IP_LOST_TIMER_INTERVAL=120 +CONFIG_ESP_NETIF_TCPIP_LWIP=y +# CONFIG_ESP_NETIF_LOOPBACK is not set +CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER=y +# end of ESP NETIF Adapter + +# +# ESP System Settings +# +# CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT is not set +CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT=y +# CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set +# CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set +# end of ESP System Settings + +# +# High resolution timer (esp_timer) +# +# CONFIG_ESP_TIMER_PROFILING is not set +CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584 +# CONFIG_ESP_TIMER_IMPL_FRC2 is not set +CONFIG_ESP_TIMER_IMPL_TG0_LAC=y +# end of High resolution timer (esp_timer) + +# +# Wi-Fi +# +CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10 +CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32 +# CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y +CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32 +# CONFIG_ESP32_WIFI_CSI_ENABLED is not set +CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y +CONFIG_ESP32_WIFI_TX_BA_WIN=6 +CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y +CONFIG_ESP32_WIFI_RX_BA_WIN=6 +CONFIG_ESP32_WIFI_NVS_ENABLED=y +CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y +# CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1 is not set +CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 +CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 +# CONFIG_ESP32_WIFI_DEBUG_LOG_ENABLE is not set +CONFIG_ESP32_WIFI_IRAM_OPT=y +CONFIG_ESP32_WIFI_RX_IRAM_OPT=y +CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y +# end of Wi-Fi + +# +# PHY +# +CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y +# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set +CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 +CONFIG_ESP32_PHY_MAX_TX_POWER=20 +# end of PHY + +# +# Core dump +# +# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set +# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set +CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y +# end of Core dump + +# +# FAT Filesystem support +# +# CONFIG_FATFS_CODEPAGE_DYNAMIC is not set +CONFIG_FATFS_CODEPAGE_437=y +# CONFIG_FATFS_CODEPAGE_720 is not set +# CONFIG_FATFS_CODEPAGE_737 is not set +# CONFIG_FATFS_CODEPAGE_771 is not set +# CONFIG_FATFS_CODEPAGE_775 is not set +# CONFIG_FATFS_CODEPAGE_850 is not set +# CONFIG_FATFS_CODEPAGE_852 is not set +# CONFIG_FATFS_CODEPAGE_855 is not set +# CONFIG_FATFS_CODEPAGE_857 is not set +# CONFIG_FATFS_CODEPAGE_860 is not set +# CONFIG_FATFS_CODEPAGE_861 is not set +# CONFIG_FATFS_CODEPAGE_862 is not set +# CONFIG_FATFS_CODEPAGE_863 is not set +# CONFIG_FATFS_CODEPAGE_864 is not set +# CONFIG_FATFS_CODEPAGE_865 is not set +# CONFIG_FATFS_CODEPAGE_866 is not set +# CONFIG_FATFS_CODEPAGE_869 is not set +# CONFIG_FATFS_CODEPAGE_932 is not set +# CONFIG_FATFS_CODEPAGE_936 is not set +# CONFIG_FATFS_CODEPAGE_949 is not set +# CONFIG_FATFS_CODEPAGE_950 is not set +CONFIG_FATFS_CODEPAGE=437 +CONFIG_FATFS_LFN_NONE=y +# CONFIG_FATFS_LFN_HEAP is not set +# CONFIG_FATFS_LFN_STACK is not set +CONFIG_FATFS_FS_LOCK=0 +CONFIG_FATFS_TIMEOUT_MS=10000 +CONFIG_FATFS_PER_FILE_CACHE=y +# end of FAT Filesystem support + +# +# Modbus configuration +# +CONFIG_FMB_COMM_MODE_RTU_EN=y +CONFIG_FMB_COMM_MODE_ASCII_EN=y +CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND=150 +CONFIG_FMB_MASTER_DELAY_MS_CONVERT=200 +CONFIG_FMB_QUEUE_LENGTH=20 +CONFIG_FMB_SERIAL_TASK_STACK_SIZE=2048 +CONFIG_FMB_SERIAL_BUF_SIZE=256 +CONFIG_FMB_SERIAL_ASCII_BITS_PER_SYMB=8 +CONFIG_FMB_SERIAL_ASCII_TIMEOUT_RESPOND_MS=1000 +CONFIG_FMB_SERIAL_TASK_PRIO=10 +# CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT is not set +CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT=20 +CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 +CONFIG_FMB_CONTROLLER_STACK_SIZE=4096 +CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20 +CONFIG_FMB_TIMER_PORT_ENABLED=y +CONFIG_FMB_TIMER_GROUP=0 +CONFIG_FMB_TIMER_INDEX=0 +# CONFIG_FMB_TIMER_ISR_IN_IRAM is not set +# end of Modbus configuration + +# +# FreeRTOS +# +# CONFIG_FREERTOS_UNICORE is not set +CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF +CONFIG_FREERTOS_CORETIMER_0=y +# CONFIG_FREERTOS_CORETIMER_1 is not set +CONFIG_FREERTOS_HZ=100 +CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y +# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set +# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set +CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y +# CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set +CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y +# CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set +# CONFIG_FREERTOS_ASSERT_DISABLE is not set +CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536 +CONFIG_FREERTOS_ISR_STACKSIZE=1536 +# CONFIG_FREERTOS_LEGACY_HOOKS is not set +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 +# CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION is not set +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +# CONFIG_FREERTOS_USE_TRACE_FACILITY is not set +# CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set +CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y +CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y +# CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set +CONFIG_FREERTOS_DEBUG_OCDAWARE=y +# CONFIG_FREERTOS_FPU_IN_ISR is not set +# end of FreeRTOS + +# +# Heap memory debugging +# +CONFIG_HEAP_POISONING_DISABLED=y +# CONFIG_HEAP_POISONING_LIGHT is not set +# CONFIG_HEAP_POISONING_COMPREHENSIVE is not set +CONFIG_HEAP_TRACING_OFF=y +# CONFIG_HEAP_TRACING_STANDALONE is not set +# CONFIG_HEAP_TRACING_TOHOST is not set +# CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS is not set +# end of Heap memory debugging + +# +# jsmn +# +# CONFIG_JSMN_PARENT_LINKS is not set +# CONFIG_JSMN_STRICT is not set +# end of jsmn + +# +# libsodium +# +# end of libsodium + +# +# Log output +# +# CONFIG_LOG_DEFAULT_LEVEL_NONE is not set +# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set +# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set +CONFIG_LOG_DEFAULT_LEVEL_INFO=y +# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set +# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set +CONFIG_LOG_DEFAULT_LEVEL=3 +CONFIG_LOG_COLORS=y +CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y +# CONFIG_LOG_TIMESTAMP_SOURCE_SYSTEM is not set +# end of Log output + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y +# CONFIG_LWIP_L2_TO_L3_COPY is not set +# CONFIG_LWIP_IRAM_OPTIMIZATION is not set +CONFIG_LWIP_TIMERS_ONDEMAND=y +CONFIG_LWIP_MAX_SOCKETS=10 +# CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set +# CONFIG_LWIP_SO_LINGER is not set +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y +# CONFIG_LWIP_SO_RCVBUF is not set +# CONFIG_LWIP_NETBUF_RECVINFO is not set +CONFIG_LWIP_IP4_FRAG=y +CONFIG_LWIP_IP6_FRAG=y +# CONFIG_LWIP_IP4_REASSEMBLY is not set +# CONFIG_LWIP_IP6_REASSEMBLY is not set +# CONFIG_LWIP_IP_FORWARD is not set +# CONFIG_LWIP_STATS is not set +# CONFIG_LWIP_ETHARP_TRUST_IP_MAC is not set +CONFIG_LWIP_ESP_GRATUITOUS_ARP=y +CONFIG_LWIP_GARP_TMR_INTERVAL=60 +CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32 +CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y +# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set + +# +# DHCP server +# +CONFIG_LWIP_DHCPS_LEASE_UNIT=60 +CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 +# end of DHCP server + +# CONFIG_LWIP_AUTOIP is not set +# CONFIG_LWIP_IPV6_AUTOCONFIG is not set +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 + +# +# TCP +# +CONFIG_LWIP_MAX_ACTIVE_TCP=16 +CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_LWIP_TCP_MAXRTX=12 +CONFIG_LWIP_TCP_SYNMAXRTX=12 +CONFIG_LWIP_TCP_MSS=1440 +CONFIG_LWIP_TCP_TMR_INTERVAL=250 +CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 +CONFIG_LWIP_TCP_WND_DEFAULT=5744 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_SACK_OUT is not set +# CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set +CONFIG_LWIP_TCP_OVERSIZE_MSS=y +# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set +CONFIG_LWIP_TCP_RTO_TIME=1500 +# end of TCP + +# +# UDP +# +CONFIG_LWIP_MAX_UDP_PCBS=16 +CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +# end of UDP + +CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=3072 +CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y +# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set +# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1 is not set +CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF +# CONFIG_LWIP_PPP_SUPPORT is not set +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 + +# +# ICMP +# +# CONFIG_LWIP_MULTICAST_PING is not set +# CONFIG_LWIP_BROADCAST_PING is not set +# end of ICMP + +# +# LWIP RAW API +# +CONFIG_LWIP_MAX_RAW_PCBS=16 +# end of LWIP RAW API + +# +# SNTP +# +CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 +CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 +# end of SNTP + +CONFIG_LWIP_ESP_LWIP_ASSERT=y +# end of LWIP + +# +# mbedTLS +# +CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y +# CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set +# CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set +CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y +CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=16384 +CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=4096 +# CONFIG_MBEDTLS_DYNAMIC_BUFFER is not set +# CONFIG_MBEDTLS_DEBUG is not set + +# +# Certificate Bundle +# +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y +# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set +# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set +# CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set +# end of Certificate Bundle + +# CONFIG_MBEDTLS_ECP_RESTARTABLE is not set +# CONFIG_MBEDTLS_CMAC_C is not set +CONFIG_MBEDTLS_HARDWARE_AES=y +CONFIG_MBEDTLS_HARDWARE_MPI=y +CONFIG_MBEDTLS_HARDWARE_SHA=y +# CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN is not set +# CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY is not set +CONFIG_MBEDTLS_HAVE_TIME=y +# CONFIG_MBEDTLS_HAVE_TIME_DATE is not set +CONFIG_MBEDTLS_ECDSA_DETERMINISTIC=y +CONFIG_MBEDTLS_SHA512_C=y +CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y +# CONFIG_MBEDTLS_TLS_SERVER_ONLY is not set +# CONFIG_MBEDTLS_TLS_CLIENT_ONLY is not set +# CONFIG_MBEDTLS_TLS_DISABLED is not set +CONFIG_MBEDTLS_TLS_SERVER=y +CONFIG_MBEDTLS_TLS_CLIENT=y +CONFIG_MBEDTLS_TLS_ENABLED=y + +# +# TLS Key Exchange Methods +# +# CONFIG_MBEDTLS_PSK_MODES is not set +CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y +# end of TLS Key Exchange Methods + +CONFIG_MBEDTLS_SSL_RENEGOTIATION=y +# CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set +CONFIG_MBEDTLS_SSL_PROTO_TLS1=y +CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y +CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y +# CONFIG_MBEDTLS_SSL_PROTO_DTLS is not set +CONFIG_MBEDTLS_SSL_ALPN=y +CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y +CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y + +# +# Symmetric Ciphers +# +CONFIG_MBEDTLS_AES_C=y +# CONFIG_MBEDTLS_CAMELLIA_C is not set +# CONFIG_MBEDTLS_DES_C is not set +CONFIG_MBEDTLS_RC4_DISABLED=y +# CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT is not set +# CONFIG_MBEDTLS_RC4_ENABLED is not set +# CONFIG_MBEDTLS_BLOWFISH_C is not set +# CONFIG_MBEDTLS_XTEA_C is not set +CONFIG_MBEDTLS_CCM_C=y +CONFIG_MBEDTLS_GCM_C=y +# end of Symmetric Ciphers + +# CONFIG_MBEDTLS_RIPEMD160_C is not set + +# +# Certificates +# +CONFIG_MBEDTLS_PEM_PARSE_C=y +CONFIG_MBEDTLS_PEM_WRITE_C=y +CONFIG_MBEDTLS_X509_CRL_PARSE_C=y +CONFIG_MBEDTLS_X509_CSR_PARSE_C=y +# end of Certificates + +CONFIG_MBEDTLS_ECP_C=y +CONFIG_MBEDTLS_ECDH_C=y +CONFIG_MBEDTLS_ECDSA_C=y +# CONFIG_MBEDTLS_ECJPAKE_C is not set +CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y +CONFIG_MBEDTLS_ECP_NIST_OPTIM=y +# CONFIG_MBEDTLS_POLY1305_C is not set +# CONFIG_MBEDTLS_CHACHA20_C is not set +# CONFIG_MBEDTLS_HKDF_C is not set +# CONFIG_MBEDTLS_THREADING_C is not set +# CONFIG_MBEDTLS_SECURITY_RISKS is not set +# end of mbedTLS + +# +# mDNS +# +CONFIG_MDNS_MAX_SERVICES=10 +CONFIG_MDNS_TASK_PRIORITY=1 +CONFIG_MDNS_TASK_STACK_SIZE=4096 +# CONFIG_MDNS_TASK_AFFINITY_NO_AFFINITY is not set +CONFIG_MDNS_TASK_AFFINITY_CPU0=y +# CONFIG_MDNS_TASK_AFFINITY_CPU1 is not set +CONFIG_MDNS_TASK_AFFINITY=0x0 +CONFIG_MDNS_SERVICE_ADD_TIMEOUT_MS=2000 +CONFIG_MDNS_TIMER_PERIOD_MS=100 +# end of mDNS + +# +# ESP-MQTT Configurations +# +CONFIG_MQTT_PROTOCOL_311=y +CONFIG_MQTT_TRANSPORT_SSL=y +CONFIG_MQTT_TRANSPORT_WEBSOCKET=y +CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y +# CONFIG_MQTT_USE_CUSTOM_CONFIG is not set +# CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED is not set +# CONFIG_MQTT_CUSTOM_OUTBOX is not set +# end of ESP-MQTT Configurations + +# +# Newlib +# +CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y +# CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set +# CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set +# CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF is not set +# CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set +CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y +# CONFIG_NEWLIB_NANO_FORMAT is not set +# end of Newlib + +# +# NVS +# +# end of NVS + +# +# OpenSSL +# +# CONFIG_OPENSSL_DEBUG is not set +# CONFIG_OPENSSL_ASSERT_DO_NOTHING is not set +CONFIG_OPENSSL_ASSERT_EXIT=y +# end of OpenSSL + +# +# PThreads +# +CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5 +CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 +CONFIG_PTHREAD_STACK_MIN=768 +CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY=y +# CONFIG_PTHREAD_DEFAULT_CORE_0 is not set +# CONFIG_PTHREAD_DEFAULT_CORE_1 is not set +CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1 +CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread" +# end of PThreads + +# +# SPI Flash driver +# +# CONFIG_SPI_FLASH_VERIFY_WRITE is not set +# CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set +CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y +CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y +# CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set +# CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set +# CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set +# CONFIG_SPI_FLASH_SHARE_SPI1_BUS is not set +# CONFIG_SPI_FLASH_BYPASS_BLOCK_ERASE is not set +CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y +CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=20 +CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=1 + +# +# Auto-detect flash chips +# +CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_MXIC_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y +# end of Auto-detect flash chips +# end of SPI Flash driver + +# +# SPIFFS Configuration +# +CONFIG_SPIFFS_MAX_PARTITIONS=3 + +# +# SPIFFS Cache Configuration +# +CONFIG_SPIFFS_CACHE=y +CONFIG_SPIFFS_CACHE_WR=y +# CONFIG_SPIFFS_CACHE_STATS is not set +# end of SPIFFS Cache Configuration + +CONFIG_SPIFFS_PAGE_CHECK=y +CONFIG_SPIFFS_GC_MAX_RUNS=10 +# CONFIG_SPIFFS_GC_STATS is not set +CONFIG_SPIFFS_PAGE_SIZE=256 +CONFIG_SPIFFS_OBJ_NAME_LEN=32 +# CONFIG_SPIFFS_FOLLOW_SYMLINKS is not set +CONFIG_SPIFFS_USE_MAGIC=y +CONFIG_SPIFFS_USE_MAGIC_LENGTH=y +CONFIG_SPIFFS_META_LENGTH=4 +CONFIG_SPIFFS_USE_MTIME=y + +# +# Debug Configuration +# +# CONFIG_SPIFFS_DBG is not set +# CONFIG_SPIFFS_API_DBG is not set +# CONFIG_SPIFFS_GC_DBG is not set +# CONFIG_SPIFFS_CACHE_DBG is not set +# CONFIG_SPIFFS_CHECK_DBG is not set +# CONFIG_SPIFFS_TEST_VISUALISATION is not set +# end of Debug Configuration +# end of SPIFFS Configuration + +# +# TinyUSB +# + +# +# Descriptor configuration +# +CONFIG_USB_DESC_CUSTOM_VID=0x1234 +CONFIG_USB_DESC_CUSTOM_PID=0x5678 +# end of Descriptor configuration +# end of TinyUSB + +# +# Unity unit testing library +# +CONFIG_UNITY_ENABLE_FLOAT=y +CONFIG_UNITY_ENABLE_DOUBLE=y +# CONFIG_UNITY_ENABLE_COLOR is not set +CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y +# CONFIG_UNITY_ENABLE_FIXTURE is not set +# CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL is not set +# end of Unity unit testing library + +# +# Virtual file system +# +CONFIG_VFS_SUPPORT_IO=y +CONFIG_VFS_SUPPORT_DIR=y +CONFIG_VFS_SUPPORT_SELECT=y +CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y +CONFIG_VFS_SUPPORT_TERMIOS=y + +# +# Host File System I/O (Semihosting) +# +CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS=1 +CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 +# end of Host File System I/O (Semihosting) +# end of Virtual file system + +# +# Wear Levelling +# +# CONFIG_WL_SECTOR_SIZE_512 is not set +CONFIG_WL_SECTOR_SIZE_4096=y +CONFIG_WL_SECTOR_SIZE=4096 +# end of Wear Levelling + +# +# Wi-Fi Provisioning Manager +# +CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 +CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30 +# end of Wi-Fi Provisioning Manager + +# +# Supplicant +# +CONFIG_WPA_MBEDTLS_CRYPTO=y +# CONFIG_WPA_DEBUG_PRINT is not set +# CONFIG_WPA_TESTING_OPTIONS is not set +# CONFIG_WPA_WPS_WARS is not set +# end of Supplicant +# end of Component config + +# +# Compatibility options +# +# CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set +# end of Compatibility options + +# Deprecated options for backward compatibility +CONFIG_TOOLPREFIX="xtensa-esp32-elf-" +# CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set +CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y +# CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set +CONFIG_LOG_BOOTLOADER_LEVEL=3 +# CONFIG_APP_ROLLBACK_ENABLE is not set +# CONFIG_FLASH_ENCRYPTION_ENABLED is not set +# CONFIG_FLASHMODE_QIO is not set +# CONFIG_FLASHMODE_QOUT is not set +CONFIG_FLASHMODE_DIO=y +# CONFIG_FLASHMODE_DOUT is not set +# CONFIG_MONITOR_BAUD_9600B is not set +# CONFIG_MONITOR_BAUD_57600B is not set +CONFIG_MONITOR_BAUD_115200B=y +# CONFIG_MONITOR_BAUD_230400B is not set +# CONFIG_MONITOR_BAUD_921600B is not set +# CONFIG_MONITOR_BAUD_2MB is not set +# CONFIG_MONITOR_BAUD_OTHER is not set +CONFIG_MONITOR_BAUD_OTHER_VAL=115200 +CONFIG_MONITOR_BAUD=115200 +CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y +# CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set +CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y +# CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set +# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set +# CONFIG_CXX_EXCEPTIONS is not set +CONFIG_STACK_CHECK_NONE=y +# CONFIG_STACK_CHECK_NORM is not set +# CONFIG_STACK_CHECK_STRONG is not set +# CONFIG_STACK_CHECK_ALL is not set +# CONFIG_WARN_WRITE_STRINGS is not set +# CONFIG_DISABLE_GCC8_WARNINGS is not set +# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set +CONFIG_ESP32_APPTRACE_DEST_NONE=y +CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y +CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=0 +CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF=0 +CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF=0 +CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0 +CONFIG_ADC2_DISABLE_DAC=y +# CONFIG_SPIRAM_SUPPORT is not set +CONFIG_TRACEMEM_RESERVE_DRAM=0x0 +# CONFIG_TWO_UNIVERSAL_MAC_ADDRESS is not set +CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y +CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4 +# CONFIG_ULP_COPROC_ENABLED is not set +CONFIG_ULP_COPROC_RESERVE_MEM=0 +CONFIG_BROWNOUT_DET=y +CONFIG_BROWNOUT_DET_LVL_SEL_0=y +# CONFIG_BROWNOUT_DET_LVL_SEL_1 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_2 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_3 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_4 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_5 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_6 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_7 is not set +CONFIG_BROWNOUT_DET_LVL=0 +CONFIG_REDUCE_PHY_TX_POWER=y +CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y +# CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL is not set +# CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC is not set +# CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256 is not set +# CONFIG_DISABLE_BASIC_ROM_CONSOLE is not set +# CONFIG_NO_BLOBS is not set +# CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set +CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 +CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304 +CONFIG_MAIN_TASK_STACK_SIZE=3584 +CONFIG_IPC_TASK_STACK_SIZE=1024 +CONFIG_CONSOLE_UART_DEFAULT=y +# CONFIG_CONSOLE_UART_CUSTOM is not set +# CONFIG_CONSOLE_UART_NONE is not set +CONFIG_CONSOLE_UART_NUM=0 +CONFIG_CONSOLE_UART_TX_GPIO=1 +CONFIG_CONSOLE_UART_RX_GPIO=3 +CONFIG_CONSOLE_UART_BAUDRATE=115200 +CONFIG_INT_WDT=y +CONFIG_INT_WDT_TIMEOUT_MS=300 +CONFIG_INT_WDT_CHECK_CPU1=y +CONFIG_TASK_WDT=y +# CONFIG_TASK_WDT_PANIC is not set +CONFIG_TASK_WDT_TIMEOUT_S=5 +CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y +CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=y +# CONFIG_EVENT_LOOP_PROFILING is not set +CONFIG_POST_EVENTS_FROM_ISR=y +CONFIG_POST_EVENTS_FROM_IRAM_ISR=y +# CONFIG_ESP32S2_PANIC_PRINT_HALT is not set +CONFIG_ESP32S2_PANIC_PRINT_REBOOT=y +# CONFIG_ESP32S2_PANIC_SILENT_REBOOT is not set +# CONFIG_ESP32S2_PANIC_GDBSTUB is not set +CONFIG_TIMER_TASK_STACK_SIZE=3584 +CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150 +CONFIG_MB_MASTER_DELAY_MS_CONVERT=200 +CONFIG_MB_QUEUE_LENGTH=20 +CONFIG_MB_SERIAL_TASK_STACK_SIZE=2048 +CONFIG_MB_SERIAL_BUF_SIZE=256 +CONFIG_MB_SERIAL_TASK_PRIO=10 +# CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT is not set +CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20 +CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 +CONFIG_MB_CONTROLLER_STACK_SIZE=4096 +CONFIG_MB_EVENT_QUEUE_TIMEOUT=20 +CONFIG_MB_TIMER_PORT_ENABLED=y +CONFIG_MB_TIMER_GROUP=0 +CONFIG_MB_TIMER_INDEX=0 +# CONFIG_SUPPORT_STATIC_ALLOCATION is not set +CONFIG_TIMER_TASK_PRIORITY=1 +CONFIG_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_TIMER_QUEUE_LENGTH=10 +# CONFIG_L2_TO_L3_COPY is not set +# CONFIG_USE_ONLY_LWIP_SELECT is not set +CONFIG_ESP_GRATUITOUS_ARP=y +CONFIG_GARP_TMR_INTERVAL=60 +CONFIG_TCPIP_RECVMBOX_SIZE=32 +CONFIG_TCP_MAXRTX=12 +CONFIG_TCP_SYNMAXRTX=12 +CONFIG_TCP_MSS=1440 +CONFIG_TCP_MSL=60000 +CONFIG_TCP_SND_BUF_DEFAULT=5744 +CONFIG_TCP_WND_DEFAULT=5744 +CONFIG_TCP_RECVMBOX_SIZE=6 +CONFIG_TCP_QUEUE_OOSEQ=y +# CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set +CONFIG_TCP_OVERSIZE_MSS=y +# CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_TCP_OVERSIZE_DISABLE is not set +CONFIG_UDP_RECVMBOX_SIZE=6 +CONFIG_TCPIP_TASK_STACK_SIZE=3072 +CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y +# CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set +# CONFIG_TCPIP_TASK_AFFINITY_CPU1 is not set +CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF +# CONFIG_PPP_SUPPORT is not set +CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 +CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 +CONFIG_ESP32_PTHREAD_STACK_MIN=768 +CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y +# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0 is not set +# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1 is not set +CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 +CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" +CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y +# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set +# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set +CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y +CONFIG_SUPPORT_TERMIOS=y +CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 +CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 +# End of deprecated options diff --git a/software/sdkconfig.tinypico b/software/sdkconfig.tinypico new file mode 100644 index 0000000..e18e7ec --- /dev/null +++ b/software/sdkconfig.tinypico @@ -0,0 +1,1387 @@ +# +# Automatically generated file. DO NOT EDIT. +# Espressif IoT Development Framework (ESP-IDF) Project Configuration +# +CONFIG_IDF_CMAKE=y +CONFIG_IDF_TARGET_ARCH_XTENSA=y +CONFIG_IDF_TARGET="esp32" +CONFIG_IDF_TARGET_ESP32=y +CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000 + +# +# SDK tool configuration +# +CONFIG_SDK_TOOLPREFIX="xtensa-esp32-elf-" +# CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS is not set +# end of SDK tool configuration + +# +# Build type +# +CONFIG_APP_BUILD_TYPE_APP_2NDBOOT=y +# CONFIG_APP_BUILD_TYPE_ELF_RAM is not set +CONFIG_APP_BUILD_GENERATE_BINARIES=y +CONFIG_APP_BUILD_BOOTLOADER=y +CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y +# end of Build type + +# +# Application manager +# +CONFIG_APP_COMPILE_TIME_DATE=y +# CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set +# CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set +# CONFIG_APP_PROJECT_VER_FROM_CONFIG is not set +CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16 +# end of Application manager + +# +# Bootloader config +# +CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x1000 +CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_NONE is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set +CONFIG_BOOTLOADER_LOG_LEVEL_INFO=y +# CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set +CONFIG_BOOTLOADER_LOG_LEVEL=3 +# CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V is not set +CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y +# CONFIG_BOOTLOADER_FACTORY_RESET is not set +# CONFIG_BOOTLOADER_APP_TEST is not set +CONFIG_BOOTLOADER_WDT_ENABLE=y +# CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set +CONFIG_BOOTLOADER_WDT_TIME_MS=9000 +# CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set +# CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP is not set +# CONFIG_BOOTLOADER_SKIP_VALIDATE_ON_POWER_ON is not set +# CONFIG_BOOTLOADER_SKIP_VALIDATE_ALWAYS is not set +CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0 +# CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC is not set +CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y +# end of Bootloader config + +# +# Security features +# +# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set +# CONFIG_SECURE_BOOT is not set +# CONFIG_SECURE_FLASH_ENC_ENABLED is not set +# end of Security features + +# +# Serial flasher config +# +CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 +# CONFIG_ESPTOOLPY_NO_STUB is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set +CONFIG_ESPTOOLPY_FLASHMODE_DIO=y +# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set +CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_STR=y +CONFIG_ESPTOOLPY_FLASHMODE="dio" +# CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set +CONFIG_ESPTOOLPY_FLASHFREQ_40M=y +# CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set +CONFIG_ESPTOOLPY_FLASHFREQ="40m" +# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set +CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y +# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set +CONFIG_ESPTOOLPY_FLASHSIZE="2MB" +CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y +CONFIG_ESPTOOLPY_BEFORE_RESET=y +# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set +CONFIG_ESPTOOLPY_BEFORE="default_reset" +CONFIG_ESPTOOLPY_AFTER_RESET=y +# CONFIG_ESPTOOLPY_AFTER_NORESET is not set +CONFIG_ESPTOOLPY_AFTER="hard_reset" +# CONFIG_ESPTOOLPY_MONITOR_BAUD_CONSOLE is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set +CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y +# CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set +CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200 +CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 +# end of Serial flasher config + +# +# Partition Table +# +CONFIG_PARTITION_TABLE_SINGLE_APP=y +# CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set +# CONFIG_PARTITION_TABLE_TWO_OTA is not set +# CONFIG_PARTITION_TABLE_CUSTOM is not set +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" +CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" +CONFIG_PARTITION_TABLE_OFFSET=0x8000 +CONFIG_PARTITION_TABLE_MD5=y +# end of Partition Table + +# +# Compiler options +# +CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y +# CONFIG_COMPILER_OPTIMIZATION_SIZE is not set +# CONFIG_COMPILER_OPTIMIZATION_PERF is not set +# CONFIG_COMPILER_OPTIMIZATION_NONE is not set +CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y +# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set +# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set +CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL=2 +# CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT is not set +CONFIG_COMPILER_HIDE_PATHS_MACROS=y +# CONFIG_COMPILER_CXX_EXCEPTIONS is not set +# CONFIG_COMPILER_CXX_RTTI is not set +CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y +# CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set +# CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set +# CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set +# CONFIG_COMPILER_WARN_WRITE_STRINGS is not set +# CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set +# CONFIG_COMPILER_DUMP_RTL_FILES is not set +# end of Compiler options + +# +# Component config +# + +# +# Application Level Tracing +# +# CONFIG_APPTRACE_DEST_JTAG is not set +CONFIG_APPTRACE_DEST_NONE=y +CONFIG_APPTRACE_LOCK_ENABLE=y +# end of Application Level Tracing + +# +# ESP-ASIO +# +# CONFIG_ASIO_SSL_SUPPORT is not set +# end of ESP-ASIO + +# +# Bluetooth +# +# CONFIG_BT_ENABLED is not set +# end of Bluetooth + +# +# CoAP Configuration +# +CONFIG_COAP_MBEDTLS_PSK=y +# CONFIG_COAP_MBEDTLS_PKI is not set +# CONFIG_COAP_MBEDTLS_DEBUG is not set +CONFIG_COAP_LOG_DEFAULT_LEVEL=0 +# end of CoAP Configuration + +# +# Driver configurations +# + +# +# ADC configuration +# +# CONFIG_ADC_FORCE_XPD_FSM is not set +CONFIG_ADC_DISABLE_DAC=y +# end of ADC configuration + +# +# MCPWM configuration +# +# CONFIG_MCPWM_ISR_IN_IRAM is not set +# end of MCPWM configuration + +# +# SPI configuration +# +# CONFIG_SPI_MASTER_IN_IRAM is not set +CONFIG_SPI_MASTER_ISR_IN_IRAM=y +# CONFIG_SPI_SLAVE_IN_IRAM is not set +CONFIG_SPI_SLAVE_ISR_IN_IRAM=y +# end of SPI configuration + +# +# TWAI configuration +# +# CONFIG_TWAI_ISR_IN_IRAM is not set +# CONFIG_TWAI_ERRATA_FIX_BUS_OFF_REC is not set +# CONFIG_TWAI_ERRATA_FIX_TX_INTR_LOST is not set +# CONFIG_TWAI_ERRATA_FIX_RX_FRAME_INVALID is not set +# CONFIG_TWAI_ERRATA_FIX_RX_FIFO_CORRUPT is not set +# end of TWAI configuration + +# +# UART configuration +# +# CONFIG_UART_ISR_IN_IRAM is not set +# end of UART configuration + +# +# RTCIO configuration +# +# CONFIG_RTCIO_SUPPORT_RTC_GPIO_DESC is not set +# end of RTCIO configuration + +# +# GPIO Configuration +# +# CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL is not set +# end of GPIO Configuration + +# +# GDMA Configuration +# +# CONFIG_GDMA_CTRL_FUNC_IN_IRAM is not set +# CONFIG_GDMA_ISR_IRAM_SAFE is not set +# end of GDMA Configuration +# end of Driver configurations + +# +# eFuse Bit Manager +# +# CONFIG_EFUSE_CUSTOM_TABLE is not set +# CONFIG_EFUSE_VIRTUAL is not set +# CONFIG_EFUSE_CODE_SCHEME_COMPAT_NONE is not set +CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4=y +# CONFIG_EFUSE_CODE_SCHEME_COMPAT_REPEAT is not set +CONFIG_EFUSE_MAX_BLK_LEN=192 +# end of eFuse Bit Manager + +# +# ESP-TLS +# +CONFIG_ESP_TLS_USING_MBEDTLS=y +# CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set +CONFIG_ESP_TLS_SERVER=y +# CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set +# CONFIG_ESP_TLS_SERVER_SESSION_TICKETS is not set +# CONFIG_ESP_TLS_PSK_VERIFICATION is not set +# CONFIG_ESP_TLS_INSECURE is not set +# end of ESP-TLS + +# +# ESP32-specific +# +CONFIG_ESP32_REV_MIN_0=y +# CONFIG_ESP32_REV_MIN_1 is not set +# CONFIG_ESP32_REV_MIN_2 is not set +# CONFIG_ESP32_REV_MIN_3 is not set +CONFIG_ESP32_REV_MIN=0 +CONFIG_ESP32_DPORT_WORKAROUND=y +# CONFIG_ESP32_DEFAULT_CPU_FREQ_80 is not set +CONFIG_ESP32_DEFAULT_CPU_FREQ_160=y +# CONFIG_ESP32_DEFAULT_CPU_FREQ_240 is not set +CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=160 +# CONFIG_ESP32_SPIRAM_SUPPORT is not set +# CONFIG_ESP32_TRAX is not set +CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0x0 +# CONFIG_ESP32_ULP_COPROC_ENABLED is not set +CONFIG_ESP32_ULP_COPROC_RESERVE_MEM=0 +CONFIG_ESP32_DEBUG_OCDAWARE=y +CONFIG_ESP32_BROWNOUT_DET=y +CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_0=y +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_1 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_2 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_3 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_4 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_5 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_6 is not set +# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_7 is not set +CONFIG_ESP32_BROWNOUT_DET_LVL=0 +CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y +# CONFIG_ESP32_TIME_SYSCALL_USE_RTC is not set +# CONFIG_ESP32_TIME_SYSCALL_USE_FRC1 is not set +# CONFIG_ESP32_TIME_SYSCALL_USE_NONE is not set +CONFIG_ESP32_RTC_CLK_SRC_INT_RC=y +# CONFIG_ESP32_RTC_CLK_SRC_EXT_CRYS is not set +# CONFIG_ESP32_RTC_CLK_SRC_EXT_OSC is not set +# CONFIG_ESP32_RTC_CLK_SRC_INT_8MD256 is not set +CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024 +CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000 +CONFIG_ESP32_XTAL_FREQ_40=y +# CONFIG_ESP32_XTAL_FREQ_26 is not set +# CONFIG_ESP32_XTAL_FREQ_AUTO is not set +CONFIG_ESP32_XTAL_FREQ=40 +# CONFIG_ESP32_DISABLE_BASIC_ROM_CONSOLE is not set +# CONFIG_ESP32_NO_BLOBS is not set +# CONFIG_ESP32_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set +# CONFIG_ESP32_COMPATIBLE_PRE_V3_1_BOOTLOADERS is not set +# CONFIG_ESP32_USE_FIXED_STATIC_RAM_SIZE is not set +CONFIG_ESP32_DPORT_DIS_INTERRUPT_LVL=5 +# end of ESP32-specific + +# +# ADC-Calibration +# +CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y +CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y +CONFIG_ADC_CAL_LUT_ENABLE=y +# end of ADC-Calibration + +# +# Common ESP-related +# +CONFIG_ESP_ERR_TO_NAME_LOOKUP=y +# end of Common ESP-related + +# +# Ethernet +# +CONFIG_ETH_ENABLED=y +CONFIG_ETH_USE_ESP32_EMAC=y +CONFIG_ETH_PHY_INTERFACE_RMII=y +CONFIG_ETH_RMII_CLK_INPUT=y +# CONFIG_ETH_RMII_CLK_OUTPUT is not set +CONFIG_ETH_RMII_CLK_IN_GPIO=0 +CONFIG_ETH_DMA_BUFFER_SIZE=512 +CONFIG_ETH_DMA_RX_BUFFER_NUM=10 +CONFIG_ETH_DMA_TX_BUFFER_NUM=10 +CONFIG_ETH_USE_SPI_ETHERNET=y +# CONFIG_ETH_SPI_ETHERNET_DM9051 is not set +# CONFIG_ETH_SPI_ETHERNET_W5500 is not set +# CONFIG_ETH_SPI_ETHERNET_KSZ8851SNL is not set +# CONFIG_ETH_USE_OPENETH is not set +# end of Ethernet + +# +# Event Loop Library +# +# CONFIG_ESP_EVENT_LOOP_PROFILING is not set +CONFIG_ESP_EVENT_POST_FROM_ISR=y +CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y +# end of Event Loop Library + +# +# GDB Stub +# +# end of GDB Stub + +# +# ESP HTTP client +# +CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y +# CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH is not set +CONFIG_ESP_HTTP_CLIENT_ENABLE_DIGEST_AUTH=y +# end of ESP HTTP client + +# +# HTTP Server +# +CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 +CONFIG_HTTPD_MAX_URI_LEN=512 +CONFIG_HTTPD_ERR_RESP_NO_DELAY=y +CONFIG_HTTPD_PURGE_BUF_LEN=32 +# CONFIG_HTTPD_LOG_PURGE_DATA is not set +# CONFIG_HTTPD_WS_SUPPORT is not set +# end of HTTP Server + +# +# ESP HTTPS OTA +# +# CONFIG_OTA_ALLOW_HTTP is not set +# end of ESP HTTPS OTA + +# +# ESP HTTPS server +# +CONFIG_ESP_HTTPS_SERVER_ENABLE=y +# end of ESP HTTPS server + +# +# Hardware Settings +# + +# +# MAC Config +# +CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_STA=y +CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_AP=y +CONFIG_ESP_MAC_ADDR_UNIVERSE_BT=y +CONFIG_ESP_MAC_ADDR_UNIVERSE_ETH=y +# CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_TWO is not set +CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR=y +CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES=4 +# end of MAC Config + +# +# Sleep Config +# +CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y +CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND=y +# CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND is not set +# CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND is not set +# end of Sleep Config + +# +# RTC Clock Config +# +# end of RTC Clock Config +# end of Hardware Settings + +# +# IPC (Inter-Processor Call) +# +CONFIG_ESP_IPC_TASK_STACK_SIZE=1024 +CONFIG_ESP_IPC_USES_CALLERS_PRIORITY=y +CONFIG_ESP_IPC_ISR_ENABLE=y +# end of IPC (Inter-Processor Call) + +# +# LCD and Touch Panel +# + +# +# LCD Peripheral Configuration +# +CONFIG_LCD_PANEL_IO_FORMAT_BUF_SIZE=32 +# end of LCD Peripheral Configuration +# end of LCD and Touch Panel + +# +# ESP NETIF Adapter +# +CONFIG_ESP_NETIF_IP_LOST_TIMER_INTERVAL=120 +CONFIG_ESP_NETIF_TCPIP_LWIP=y +# CONFIG_ESP_NETIF_LOOPBACK is not set +CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER=y +# end of ESP NETIF Adapter + +# +# PHY +# +CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE=y +# CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION is not set +CONFIG_ESP_PHY_MAX_WIFI_TX_POWER=20 +CONFIG_ESP_PHY_MAX_TX_POWER=20 +CONFIG_ESP_PHY_REDUCE_TX_POWER=y +# end of PHY + +# +# Power Management +# +# CONFIG_PM_ENABLE is not set +# end of Power Management + +# +# ESP System Settings +# +# CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT is not set +CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT=y +# CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set +# CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set +# CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME is not set + +# +# Memory protection +# +# end of Memory protection + +CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 +CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2304 +CONFIG_ESP_MAIN_TASK_STACK_SIZE=3584 +CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0=y +# CONFIG_ESP_MAIN_TASK_AFFINITY_CPU1 is not set +# CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set +CONFIG_ESP_MAIN_TASK_AFFINITY=0x0 +CONFIG_ESP_MINIMAL_SHARED_STACK_SIZE=2048 +CONFIG_ESP_CONSOLE_UART_DEFAULT=y +# CONFIG_ESP_CONSOLE_UART_CUSTOM is not set +# CONFIG_ESP_CONSOLE_NONE is not set +CONFIG_ESP_CONSOLE_UART=y +CONFIG_ESP_CONSOLE_MULTIPLE_UART=y +CONFIG_ESP_CONSOLE_UART_NUM=0 +CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 +CONFIG_ESP_INT_WDT=y +CONFIG_ESP_INT_WDT_TIMEOUT_MS=300 +CONFIG_ESP_INT_WDT_CHECK_CPU1=y +CONFIG_ESP_TASK_WDT=y +# CONFIG_ESP_TASK_WDT_PANIC is not set +CONFIG_ESP_TASK_WDT_TIMEOUT_S=5 +CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=y +CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1=y +# CONFIG_ESP_PANIC_HANDLER_IRAM is not set +# CONFIG_ESP_DEBUG_STUBS_ENABLE is not set +# CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set +CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_4=y +# end of ESP System Settings + +# +# High resolution timer (esp_timer) +# +# CONFIG_ESP_TIMER_PROFILING is not set +CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER=y +CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER=y +CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584 +CONFIG_ESP_TIMER_INTERRUPT_LEVEL=1 +# CONFIG_ESP_TIMER_SUPPORTS_ISR_DISPATCH_METHOD is not set +# CONFIG_ESP_TIMER_IMPL_FRC2 is not set +CONFIG_ESP_TIMER_IMPL_TG0_LAC=y +# end of High resolution timer (esp_timer) + +# +# Wi-Fi +# +CONFIG_ESP32_WIFI_ENABLED=y +CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10 +CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32 +# CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y +CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32 +# CONFIG_ESP32_WIFI_CSI_ENABLED is not set +CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y +CONFIG_ESP32_WIFI_TX_BA_WIN=6 +CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y +CONFIG_ESP32_WIFI_RX_BA_WIN=6 +CONFIG_ESP32_WIFI_NVS_ENABLED=y +CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y +# CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1 is not set +CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 +CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 +CONFIG_ESP32_WIFI_IRAM_OPT=y +CONFIG_ESP32_WIFI_RX_IRAM_OPT=y +CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y +# CONFIG_ESP_WIFI_SLP_IRAM_OPT is not set +# CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set +# CONFIG_ESP_WIFI_GMAC_SUPPORT is not set +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y +# end of Wi-Fi + +# +# Core dump +# +# CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH is not set +# CONFIG_ESP_COREDUMP_ENABLE_TO_UART is not set +CONFIG_ESP_COREDUMP_ENABLE_TO_NONE=y +# end of Core dump + +# +# FAT Filesystem support +# +# CONFIG_FATFS_CODEPAGE_DYNAMIC is not set +CONFIG_FATFS_CODEPAGE_437=y +# CONFIG_FATFS_CODEPAGE_720 is not set +# CONFIG_FATFS_CODEPAGE_737 is not set +# CONFIG_FATFS_CODEPAGE_771 is not set +# CONFIG_FATFS_CODEPAGE_775 is not set +# CONFIG_FATFS_CODEPAGE_850 is not set +# CONFIG_FATFS_CODEPAGE_852 is not set +# CONFIG_FATFS_CODEPAGE_855 is not set +# CONFIG_FATFS_CODEPAGE_857 is not set +# CONFIG_FATFS_CODEPAGE_860 is not set +# CONFIG_FATFS_CODEPAGE_861 is not set +# CONFIG_FATFS_CODEPAGE_862 is not set +# CONFIG_FATFS_CODEPAGE_863 is not set +# CONFIG_FATFS_CODEPAGE_864 is not set +# CONFIG_FATFS_CODEPAGE_865 is not set +# CONFIG_FATFS_CODEPAGE_866 is not set +# CONFIG_FATFS_CODEPAGE_869 is not set +# CONFIG_FATFS_CODEPAGE_932 is not set +# CONFIG_FATFS_CODEPAGE_936 is not set +# CONFIG_FATFS_CODEPAGE_949 is not set +# CONFIG_FATFS_CODEPAGE_950 is not set +CONFIG_FATFS_CODEPAGE=437 +CONFIG_FATFS_LFN_NONE=y +# CONFIG_FATFS_LFN_HEAP is not set +# CONFIG_FATFS_LFN_STACK is not set +CONFIG_FATFS_FS_LOCK=0 +CONFIG_FATFS_TIMEOUT_MS=10000 +CONFIG_FATFS_PER_FILE_CACHE=y +# CONFIG_FATFS_USE_FASTSEEK is not set +# end of FAT Filesystem support + +# +# Modbus configuration +# +CONFIG_FMB_COMM_MODE_TCP_EN=y +CONFIG_FMB_TCP_PORT_DEFAULT=502 +CONFIG_FMB_TCP_PORT_MAX_CONN=5 +CONFIG_FMB_TCP_CONNECTION_TOUT_SEC=20 +CONFIG_FMB_COMM_MODE_RTU_EN=y +CONFIG_FMB_COMM_MODE_ASCII_EN=y +CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND=150 +CONFIG_FMB_MASTER_DELAY_MS_CONVERT=200 +CONFIG_FMB_QUEUE_LENGTH=20 +CONFIG_FMB_PORT_TASK_STACK_SIZE=4096 +CONFIG_FMB_SERIAL_BUF_SIZE=256 +CONFIG_FMB_SERIAL_ASCII_BITS_PER_SYMB=8 +CONFIG_FMB_SERIAL_ASCII_TIMEOUT_RESPOND_MS=1000 +CONFIG_FMB_PORT_TASK_PRIO=10 +# CONFIG_FMB_PORT_TASK_AFFINITY_NO_AFFINITY is not set +CONFIG_FMB_PORT_TASK_AFFINITY_CPU0=y +# CONFIG_FMB_PORT_TASK_AFFINITY_CPU1 is not set +CONFIG_FMB_PORT_TASK_AFFINITY=0x0 +CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT=y +CONFIG_FMB_CONTROLLER_SLAVE_ID=0x00112233 +CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT=20 +CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 +CONFIG_FMB_CONTROLLER_STACK_SIZE=4096 +CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20 +# CONFIG_FMB_TIMER_PORT_ENABLED is not set +CONFIG_FMB_TIMER_GROUP=0 +CONFIG_FMB_TIMER_INDEX=0 +CONFIG_FMB_MASTER_TIMER_GROUP=0 +CONFIG_FMB_MASTER_TIMER_INDEX=0 +# CONFIG_FMB_TIMER_ISR_IN_IRAM is not set +# end of Modbus configuration + +# +# FreeRTOS +# +# CONFIG_FREERTOS_UNICORE is not set +CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF +CONFIG_FREERTOS_TICK_SUPPORT_CORETIMER=y +CONFIG_FREERTOS_CORETIMER_0=y +# CONFIG_FREERTOS_CORETIMER_1 is not set +CONFIG_FREERTOS_SYSTICK_USES_CCOUNT=y +CONFIG_FREERTOS_HZ=100 +CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y +# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set +# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set +CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y +# CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set +CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y +# CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set +# CONFIG_FREERTOS_ASSERT_DISABLE is not set +CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=2304 +CONFIG_FREERTOS_ISR_STACKSIZE=1536 +# CONFIG_FREERTOS_LEGACY_HOOKS is not set +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 +CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y +# CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is not set +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +# CONFIG_FREERTOS_USE_TRACE_FACILITY is not set +# CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set +CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y +CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y +# CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set +# CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH is not set +CONFIG_FREERTOS_DEBUG_OCDAWARE=y +# CONFIG_FREERTOS_FPU_IN_ISR is not set +CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT=y +# CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH is not set +# end of FreeRTOS + +# +# Hardware Abstraction Layer (HAL) and Low Level (LL) +# +CONFIG_HAL_ASSERTION_EQUALS_SYSTEM=y +# CONFIG_HAL_ASSERTION_DISABLE is not set +# CONFIG_HAL_ASSERTION_SILIENT is not set +# CONFIG_HAL_ASSERTION_ENABLE is not set +CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=2 +# end of Hardware Abstraction Layer (HAL) and Low Level (LL) + +# +# Heap memory debugging +# +CONFIG_HEAP_POISONING_DISABLED=y +# CONFIG_HEAP_POISONING_LIGHT is not set +# CONFIG_HEAP_POISONING_COMPREHENSIVE is not set +CONFIG_HEAP_TRACING_OFF=y +# CONFIG_HEAP_TRACING_STANDALONE is not set +# CONFIG_HEAP_TRACING_TOHOST is not set +# CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS is not set +# end of Heap memory debugging + +# +# jsmn +# +# CONFIG_JSMN_PARENT_LINKS is not set +# CONFIG_JSMN_STRICT is not set +# end of jsmn + +# +# libsodium +# +# end of libsodium + +# +# Log output +# +# CONFIG_LOG_DEFAULT_LEVEL_NONE is not set +# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set +# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set +CONFIG_LOG_DEFAULT_LEVEL_INFO=y +# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set +# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set +CONFIG_LOG_DEFAULT_LEVEL=3 +CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y +# CONFIG_LOG_MAXIMUM_LEVEL_DEBUG is not set +# CONFIG_LOG_MAXIMUM_LEVEL_VERBOSE is not set +CONFIG_LOG_MAXIMUM_LEVEL=3 +CONFIG_LOG_COLORS=y +CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y +# CONFIG_LOG_TIMESTAMP_SOURCE_SYSTEM is not set +# end of Log output + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# CONFIG_LWIP_NETIF_API is not set +# CONFIG_LWIP_TCPIP_CORE_LOCKING is not set +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y +# CONFIG_LWIP_L2_TO_L3_COPY is not set +# CONFIG_LWIP_IRAM_OPTIMIZATION is not set +CONFIG_LWIP_TIMERS_ONDEMAND=y +CONFIG_LWIP_MAX_SOCKETS=10 +# CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set +# CONFIG_LWIP_SO_LINGER is not set +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y +CONFIG_LWIP_SO_RCVBUF=y +# CONFIG_LWIP_NETBUF_RECVINFO is not set +CONFIG_LWIP_IP4_FRAG=y +CONFIG_LWIP_IP6_FRAG=y +# CONFIG_LWIP_IP4_REASSEMBLY is not set +# CONFIG_LWIP_IP6_REASSEMBLY is not set +# CONFIG_LWIP_IP_FORWARD is not set +# CONFIG_LWIP_STATS is not set +# CONFIG_LWIP_ETHARP_TRUST_IP_MAC is not set +CONFIG_LWIP_ESP_GRATUITOUS_ARP=y +CONFIG_LWIP_GARP_TMR_INTERVAL=60 +CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32 +CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y +# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set +CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y +# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set +CONFIG_LWIP_DHCP_OPTIONS_LEN=68 + +# +# DHCP server +# +CONFIG_LWIP_DHCPS=y +CONFIG_LWIP_DHCPS_LEASE_UNIT=60 +CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 +# end of DHCP server + +# CONFIG_LWIP_AUTOIP is not set +CONFIG_LWIP_IPV6=y +# CONFIG_LWIP_IPV6_AUTOCONFIG is not set +CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 +# CONFIG_LWIP_IPV6_FORWARD is not set +# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 + +# +# TCP +# +CONFIG_LWIP_MAX_ACTIVE_TCP=16 +CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_LWIP_TCP_MAXRTX=12 +CONFIG_LWIP_TCP_SYNMAXRTX=12 +CONFIG_LWIP_TCP_MSS=1440 +CONFIG_LWIP_TCP_TMR_INTERVAL=250 +CONFIG_LWIP_TCP_MSL=60000 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 +CONFIG_LWIP_TCP_WND_DEFAULT=5744 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_SACK_OUT is not set +# CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set +CONFIG_LWIP_TCP_OVERSIZE_MSS=y +# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set +CONFIG_LWIP_TCP_RTO_TIME=1500 +# end of TCP + +# +# UDP +# +CONFIG_LWIP_MAX_UDP_PCBS=16 +CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +# end of UDP + +# +# Checksums +# +# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set +# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set +CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y +# end of Checksums + +CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=3072 +CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y +# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set +# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1 is not set +CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF +# CONFIG_LWIP_PPP_SUPPORT is not set +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 +# CONFIG_LWIP_SLIP_SUPPORT is not set + +# +# ICMP +# +CONFIG_LWIP_ICMP=y +# CONFIG_LWIP_MULTICAST_PING is not set +# CONFIG_LWIP_BROADCAST_PING is not set +# end of ICMP + +# +# LWIP RAW API +# +CONFIG_LWIP_MAX_RAW_PCBS=16 +# end of LWIP RAW API + +# +# SNTP +# +CONFIG_LWIP_SNTP_MAX_SERVERS=1 +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 +# end of SNTP + +CONFIG_LWIP_ESP_LWIP_ASSERT=y + +# +# Hooks +# +# CONFIG_LWIP_HOOK_TCP_ISN_NONE is not set +CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT=y +# CONFIG_LWIP_HOOK_TCP_ISN_CUSTOM is not set +CONFIG_LWIP_HOOK_IP6_ROUTE_NONE=y +# CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT is not set +# CONFIG_LWIP_HOOK_IP6_ROUTE_CUSTOM is not set +CONFIG_LWIP_HOOK_ND6_GET_GW_NONE=y +# CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT is not set +# CONFIG_LWIP_HOOK_ND6_GET_GW_CUSTOM is not set +CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_NONE=y +# CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_DEFAULT is not set +# CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_CUSTOM is not set +# end of Hooks + +# CONFIG_LWIP_DEBUG is not set +# end of LWIP + +# +# mbedTLS +# +CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y +# CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set +# CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set +CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y +CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=16384 +CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=4096 +# CONFIG_MBEDTLS_DYNAMIC_BUFFER is not set +# CONFIG_MBEDTLS_DEBUG is not set + +# +# mbedTLS v2.28.x related +# +# CONFIG_MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH is not set +# CONFIG_MBEDTLS_X509_TRUSTED_CERT_CALLBACK is not set +# CONFIG_MBEDTLS_SSL_CONTEXT_SERIALIZATION is not set +CONFIG_MBEDTLS_SSL_KEEP_PEER_CERTIFICATE=y +# end of mbedTLS v2.28.x related + +# +# Certificate Bundle +# +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y +# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set +# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set +# CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set +# end of Certificate Bundle + +# CONFIG_MBEDTLS_ECP_RESTARTABLE is not set +# CONFIG_MBEDTLS_CMAC_C is not set +CONFIG_MBEDTLS_HARDWARE_AES=y +CONFIG_MBEDTLS_HARDWARE_MPI=y +CONFIG_MBEDTLS_HARDWARE_SHA=y +CONFIG_MBEDTLS_ROM_MD5=y +# CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN is not set +# CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY is not set +CONFIG_MBEDTLS_HAVE_TIME=y +# CONFIG_MBEDTLS_HAVE_TIME_DATE is not set +CONFIG_MBEDTLS_ECDSA_DETERMINISTIC=y +CONFIG_MBEDTLS_SHA512_C=y +CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y +# CONFIG_MBEDTLS_TLS_SERVER_ONLY is not set +# CONFIG_MBEDTLS_TLS_CLIENT_ONLY is not set +# CONFIG_MBEDTLS_TLS_DISABLED is not set +CONFIG_MBEDTLS_TLS_SERVER=y +CONFIG_MBEDTLS_TLS_CLIENT=y +CONFIG_MBEDTLS_TLS_ENABLED=y + +# +# TLS Key Exchange Methods +# +# CONFIG_MBEDTLS_PSK_MODES is not set +CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y +# end of TLS Key Exchange Methods + +CONFIG_MBEDTLS_SSL_RENEGOTIATION=y +# CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set +CONFIG_MBEDTLS_SSL_PROTO_TLS1=y +CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y +CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y +# CONFIG_MBEDTLS_SSL_PROTO_GMTSSL1_1 is not set +# CONFIG_MBEDTLS_SSL_PROTO_DTLS is not set +CONFIG_MBEDTLS_SSL_ALPN=y +CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y +CONFIG_MBEDTLS_X509_CHECK_KEY_USAGE=y +CONFIG_MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE=y +CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y + +# +# Symmetric Ciphers +# +CONFIG_MBEDTLS_AES_C=y +# CONFIG_MBEDTLS_CAMELLIA_C is not set +# CONFIG_MBEDTLS_DES_C is not set +CONFIG_MBEDTLS_RC4_DISABLED=y +# CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT is not set +# CONFIG_MBEDTLS_RC4_ENABLED is not set +# CONFIG_MBEDTLS_BLOWFISH_C is not set +# CONFIG_MBEDTLS_XTEA_C is not set +CONFIG_MBEDTLS_CCM_C=y +CONFIG_MBEDTLS_GCM_C=y +# CONFIG_MBEDTLS_NIST_KW_C is not set +# end of Symmetric Ciphers + +# CONFIG_MBEDTLS_RIPEMD160_C is not set + +# +# Certificates +# +CONFIG_MBEDTLS_PEM_PARSE_C=y +CONFIG_MBEDTLS_PEM_WRITE_C=y +CONFIG_MBEDTLS_X509_CRL_PARSE_C=y +CONFIG_MBEDTLS_X509_CSR_PARSE_C=y +# end of Certificates + +CONFIG_MBEDTLS_ECP_C=y +CONFIG_MBEDTLS_ECDH_C=y +CONFIG_MBEDTLS_ECDSA_C=y +# CONFIG_MBEDTLS_ECJPAKE_C is not set +CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y +CONFIG_MBEDTLS_ECP_NIST_OPTIM=y +# CONFIG_MBEDTLS_POLY1305_C is not set +# CONFIG_MBEDTLS_CHACHA20_C is not set +# CONFIG_MBEDTLS_HKDF_C is not set +# CONFIG_MBEDTLS_THREADING_C is not set +# CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI is not set +# CONFIG_MBEDTLS_SECURITY_RISKS is not set +# end of mbedTLS + +# +# mDNS +# +CONFIG_MDNS_MAX_SERVICES=10 +CONFIG_MDNS_TASK_PRIORITY=1 +CONFIG_MDNS_TASK_STACK_SIZE=4096 +# CONFIG_MDNS_TASK_AFFINITY_NO_AFFINITY is not set +CONFIG_MDNS_TASK_AFFINITY_CPU0=y +# CONFIG_MDNS_TASK_AFFINITY_CPU1 is not set +CONFIG_MDNS_TASK_AFFINITY=0x0 +CONFIG_MDNS_SERVICE_ADD_TIMEOUT_MS=2000 +# CONFIG_MDNS_STRICT_MODE is not set +CONFIG_MDNS_TIMER_PERIOD_MS=100 +# CONFIG_MDNS_NETWORKING_SOCKET is not set +CONFIG_MDNS_MULTIPLE_INSTANCE=y +# end of mDNS + +# +# ESP-MQTT Configurations +# +CONFIG_MQTT_PROTOCOL_311=y +CONFIG_MQTT_TRANSPORT_SSL=y +CONFIG_MQTT_TRANSPORT_WEBSOCKET=y +CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y +# CONFIG_MQTT_MSG_ID_INCREMENTAL is not set +# CONFIG_MQTT_SKIP_PUBLISH_IF_DISCONNECTED is not set +# CONFIG_MQTT_REPORT_DELETED_MESSAGES is not set +# CONFIG_MQTT_USE_CUSTOM_CONFIG is not set +# CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED is not set +# CONFIG_MQTT_CUSTOM_OUTBOX is not set +# end of ESP-MQTT Configurations + +# +# Newlib +# +CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y +# CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set +# CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set +# CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF is not set +# CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set +CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y +# CONFIG_NEWLIB_NANO_FORMAT is not set +# end of Newlib + +# +# NVS +# +# end of NVS + +# +# OpenSSL +# +# CONFIG_OPENSSL_DEBUG is not set +CONFIG_OPENSSL_ERROR_STACK=y +# CONFIG_OPENSSL_ASSERT_DO_NOTHING is not set +CONFIG_OPENSSL_ASSERT_EXIT=y +# end of OpenSSL + +# +# OpenThread +# +# CONFIG_OPENTHREAD_ENABLED is not set +# end of OpenThread + +# +# PThreads +# +CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5 +CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 +CONFIG_PTHREAD_STACK_MIN=768 +CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY=y +# CONFIG_PTHREAD_DEFAULT_CORE_0 is not set +# CONFIG_PTHREAD_DEFAULT_CORE_1 is not set +CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1 +CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread" +# end of PThreads + +# +# SPI Flash driver +# +# CONFIG_SPI_FLASH_VERIFY_WRITE is not set +# CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set +CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y +CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y +# CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set +# CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set +# CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set +# CONFIG_SPI_FLASH_SHARE_SPI1_BUS is not set +# CONFIG_SPI_FLASH_BYPASS_BLOCK_ERASE is not set +CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y +CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=20 +CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=1 +CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=8192 +# CONFIG_SPI_FLASH_SIZE_OVERRIDE is not set +# CONFIG_SPI_FLASH_CHECK_ERASE_TIMEOUT_DISABLED is not set +# CONFIG_SPI_FLASH_OVERRIDE_CHIP_DRIVER_LIST is not set + +# +# Auto-detect flash chips +# +CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_MXIC_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_WINBOND_CHIP=y +# CONFIG_SPI_FLASH_SUPPORT_BOYA_CHIP is not set +# CONFIG_SPI_FLASH_SUPPORT_TH_CHIP is not set +# end of Auto-detect flash chips + +CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE=y +# end of SPI Flash driver + +# +# SPIFFS Configuration +# +CONFIG_SPIFFS_MAX_PARTITIONS=3 + +# +# SPIFFS Cache Configuration +# +CONFIG_SPIFFS_CACHE=y +CONFIG_SPIFFS_CACHE_WR=y +# CONFIG_SPIFFS_CACHE_STATS is not set +# end of SPIFFS Cache Configuration + +CONFIG_SPIFFS_PAGE_CHECK=y +CONFIG_SPIFFS_GC_MAX_RUNS=10 +# CONFIG_SPIFFS_GC_STATS is not set +CONFIG_SPIFFS_PAGE_SIZE=256 +CONFIG_SPIFFS_OBJ_NAME_LEN=32 +# CONFIG_SPIFFS_FOLLOW_SYMLINKS is not set +CONFIG_SPIFFS_USE_MAGIC=y +CONFIG_SPIFFS_USE_MAGIC_LENGTH=y +CONFIG_SPIFFS_META_LENGTH=4 +CONFIG_SPIFFS_USE_MTIME=y + +# +# Debug Configuration +# +# CONFIG_SPIFFS_DBG is not set +# CONFIG_SPIFFS_API_DBG is not set +# CONFIG_SPIFFS_GC_DBG is not set +# CONFIG_SPIFFS_CACHE_DBG is not set +# CONFIG_SPIFFS_CHECK_DBG is not set +# CONFIG_SPIFFS_TEST_VISUALISATION is not set +# end of Debug Configuration +# end of SPIFFS Configuration + +# +# TCP Transport +# + +# +# Websocket +# +CONFIG_WS_TRANSPORT=y +CONFIG_WS_BUFFER_SIZE=1024 +# end of Websocket +# end of TCP Transport + +# +# Unity unit testing library +# +CONFIG_UNITY_ENABLE_FLOAT=y +CONFIG_UNITY_ENABLE_DOUBLE=y +# CONFIG_UNITY_ENABLE_64BIT is not set +# CONFIG_UNITY_ENABLE_COLOR is not set +CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y +# CONFIG_UNITY_ENABLE_FIXTURE is not set +# CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL is not set +# end of Unity unit testing library + +# +# Virtual file system +# +CONFIG_VFS_SUPPORT_IO=y +CONFIG_VFS_SUPPORT_DIR=y +CONFIG_VFS_SUPPORT_SELECT=y +CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y +CONFIG_VFS_SUPPORT_TERMIOS=y + +# +# Host File System I/O (Semihosting) +# +CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS=1 +CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 +# end of Host File System I/O (Semihosting) +# end of Virtual file system + +# +# Wear Levelling +# +# CONFIG_WL_SECTOR_SIZE_512 is not set +CONFIG_WL_SECTOR_SIZE_4096=y +CONFIG_WL_SECTOR_SIZE=4096 +# end of Wear Levelling + +# +# Wi-Fi Provisioning Manager +# +CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 +CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30 +# end of Wi-Fi Provisioning Manager + +# +# Supplicant +# +CONFIG_WPA_MBEDTLS_CRYPTO=y +# CONFIG_WPA_WAPI_PSK is not set +# CONFIG_WPA_SUITE_B_192 is not set +# CONFIG_WPA_DEBUG_PRINT is not set +# CONFIG_WPA_TESTING_OPTIONS is not set +# CONFIG_WPA_WPS_STRICT is not set +# CONFIG_WPA_11KV_SUPPORT is not set +# end of Supplicant +# end of Component config + +# +# Compatibility options +# +# CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set +# end of Compatibility options + +# Deprecated options for backward compatibility +CONFIG_TOOLPREFIX="xtensa-esp32-elf-" +# CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set +CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y +# CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set +CONFIG_LOG_BOOTLOADER_LEVEL=3 +# CONFIG_APP_ROLLBACK_ENABLE is not set +# CONFIG_FLASH_ENCRYPTION_ENABLED is not set +# CONFIG_FLASHMODE_QIO is not set +# CONFIG_FLASHMODE_QOUT is not set +CONFIG_FLASHMODE_DIO=y +# CONFIG_FLASHMODE_DOUT is not set +# CONFIG_MONITOR_BAUD_9600B is not set +# CONFIG_MONITOR_BAUD_57600B is not set +CONFIG_MONITOR_BAUD_115200B=y +# CONFIG_MONITOR_BAUD_230400B is not set +# CONFIG_MONITOR_BAUD_921600B is not set +# CONFIG_MONITOR_BAUD_2MB is not set +# CONFIG_MONITOR_BAUD_OTHER is not set +CONFIG_MONITOR_BAUD_OTHER_VAL=115200 +CONFIG_MONITOR_BAUD=115200 +CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y +# CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set +CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y +# CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set +# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set +CONFIG_OPTIMIZATION_ASSERTION_LEVEL=2 +# CONFIG_CXX_EXCEPTIONS is not set +CONFIG_STACK_CHECK_NONE=y +# CONFIG_STACK_CHECK_NORM is not set +# CONFIG_STACK_CHECK_STRONG is not set +# CONFIG_STACK_CHECK_ALL is not set +# CONFIG_WARN_WRITE_STRINGS is not set +# CONFIG_DISABLE_GCC8_WARNINGS is not set +# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set +CONFIG_ESP32_APPTRACE_DEST_NONE=y +CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y +CONFIG_ADC2_DISABLE_DAC=y +# CONFIG_SPIRAM_SUPPORT is not set +CONFIG_TRACEMEM_RESERVE_DRAM=0x0 +# CONFIG_ULP_COPROC_ENABLED is not set +CONFIG_ULP_COPROC_RESERVE_MEM=0 +CONFIG_BROWNOUT_DET=y +CONFIG_BROWNOUT_DET_LVL_SEL_0=y +# CONFIG_BROWNOUT_DET_LVL_SEL_1 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_2 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_3 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_4 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_5 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_6 is not set +# CONFIG_BROWNOUT_DET_LVL_SEL_7 is not set +CONFIG_BROWNOUT_DET_LVL=0 +CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y +# CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL is not set +# CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC is not set +# CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256 is not set +# CONFIG_DISABLE_BASIC_ROM_CONSOLE is not set +# CONFIG_NO_BLOBS is not set +# CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set +# CONFIG_EVENT_LOOP_PROFILING is not set +CONFIG_POST_EVENTS_FROM_ISR=y +CONFIG_POST_EVENTS_FROM_IRAM_ISR=y +# CONFIG_TWO_UNIVERSAL_MAC_ADDRESS is not set +CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y +CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4 +CONFIG_ESP_SYSTEM_PD_FLASH=y +# CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND is not set +CONFIG_IPC_TASK_STACK_SIZE=1024 +CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y +# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set +CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 +CONFIG_ESP32_PHY_MAX_TX_POWER=20 +CONFIG_ESP32_REDUCE_PHY_TX_POWER=y +# CONFIG_ESP32S2_PANIC_PRINT_HALT is not set +CONFIG_ESP32S2_PANIC_PRINT_REBOOT=y +# CONFIG_ESP32S2_PANIC_SILENT_REBOOT is not set +# CONFIG_ESP32S2_PANIC_GDBSTUB is not set +CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 +CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304 +CONFIG_MAIN_TASK_STACK_SIZE=3584 +CONFIG_CONSOLE_UART_DEFAULT=y +# CONFIG_CONSOLE_UART_CUSTOM is not set +# CONFIG_ESP_CONSOLE_UART_NONE is not set +CONFIG_CONSOLE_UART=y +CONFIG_CONSOLE_UART_NUM=0 +CONFIG_CONSOLE_UART_BAUDRATE=115200 +CONFIG_INT_WDT=y +CONFIG_INT_WDT_TIMEOUT_MS=300 +CONFIG_INT_WDT_CHECK_CPU1=y +CONFIG_TASK_WDT=y +# CONFIG_TASK_WDT_PANIC is not set +CONFIG_TASK_WDT_TIMEOUT_S=5 +CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y +CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=y +# CONFIG_ESP32_DEBUG_STUBS_ENABLE is not set +CONFIG_TIMER_TASK_STACK_SIZE=3584 +# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set +# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set +CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y +CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150 +CONFIG_MB_MASTER_DELAY_MS_CONVERT=200 +CONFIG_MB_QUEUE_LENGTH=20 +CONFIG_MB_SERIAL_TASK_STACK_SIZE=4096 +CONFIG_MB_SERIAL_BUF_SIZE=256 +CONFIG_MB_SERIAL_TASK_PRIO=10 +CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT=y +CONFIG_MB_CONTROLLER_SLAVE_ID=0x00112233 +CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20 +CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 +CONFIG_MB_CONTROLLER_STACK_SIZE=4096 +CONFIG_MB_EVENT_QUEUE_TIMEOUT=20 +# CONFIG_MB_TIMER_PORT_ENABLED is not set +CONFIG_MB_TIMER_GROUP=0 +CONFIG_MB_TIMER_INDEX=0 +# CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set +CONFIG_TIMER_TASK_PRIORITY=1 +CONFIG_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_TIMER_QUEUE_LENGTH=10 +# CONFIG_L2_TO_L3_COPY is not set +# CONFIG_USE_ONLY_LWIP_SELECT is not set +CONFIG_ESP_GRATUITOUS_ARP=y +CONFIG_GARP_TMR_INTERVAL=60 +CONFIG_TCPIP_RECVMBOX_SIZE=32 +CONFIG_TCP_MAXRTX=12 +CONFIG_TCP_SYNMAXRTX=12 +CONFIG_TCP_MSS=1440 +CONFIG_TCP_MSL=60000 +CONFIG_TCP_SND_BUF_DEFAULT=5744 +CONFIG_TCP_WND_DEFAULT=5744 +CONFIG_TCP_RECVMBOX_SIZE=6 +CONFIG_TCP_QUEUE_OOSEQ=y +# CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set +CONFIG_TCP_OVERSIZE_MSS=y +# CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_TCP_OVERSIZE_DISABLE is not set +CONFIG_UDP_RECVMBOX_SIZE=6 +CONFIG_TCPIP_TASK_STACK_SIZE=3072 +CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y +# CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set +# CONFIG_TCPIP_TASK_AFFINITY_CPU1 is not set +CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF +# CONFIG_PPP_SUPPORT is not set +CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 +CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 +CONFIG_ESP32_PTHREAD_STACK_MIN=768 +CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y +# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0 is not set +# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1 is not set +CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 +CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" +CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y +# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set +# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set +CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y +CONFIG_SUPPORT_TERMIOS=y +CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 +CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 +# End of deprecated options diff --git a/software/src/.DS_Store b/software/src/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/software/src/.DS_Store differ diff --git a/software/src/CMakeLists.txt b/software/src/CMakeLists.txt new file mode 100644 index 0000000..483bc0c --- /dev/null +++ b/software/src/CMakeLists.txt @@ -0,0 +1,6 @@ +# This file was automatically generated for projects +# without default 'CMakeLists.txt' file. + +FILE(GLOB_RECURSE app_sources ${CMAKE_SOURCE_DIR}/src/*.*) + +idf_component_register(SRCS ${app_sources}) diff --git a/software/src/haptics.cpp b/software/src/haptics.cpp new file mode 100644 index 0000000..3281496 --- /dev/null +++ b/software/src/haptics.cpp @@ -0,0 +1,330 @@ +#include "haptics.h" + +// Static members for Serial listening mode +bool SerialListen::active; +int16_t SerialListen::torqueIn; +int16_t SerialListen::angleOut; +char SerialListen::serial_data[SERIAL_BUFSIZE]; +int SerialListen::serial_data_length; +std::string SerialListen::serial_data_str; +std::string SerialListen::serial_data_str_buffer; + +TorqueTuner::TorqueTuner() { + // active_mode = mode_list[0]; + num_modes = mode_list.size(); +} + +void TorqueTuner::update() { + update_angle(); + + // Filter and gate velocity for output + velocity_out = gate(filter(velocity), 5, 0); + calc_acceleration(velocity_out); + + // Calculate index to transfer function + active_mode->calc_index(this); + + // Calculate trigger and discrete output + float resolution = active_mode->max / stretch; + + angle_discrete = round(round(angle_out / resolution) * resolution); + if (abs(angle_discrete - angle_discrete_last) >= resolution) { + update_trig(); + angle_discrete_last = angle_discrete; + }; + if (active_mode == &wall) { + torque = static_cast(active_mode->calc(this)); + } else + torque = static_cast(active_mode->calc(this) - active_mode->damping * velocity); +} + +void TorqueTuner::update_angle() { + // Wrap angle + angle_delta = angle - angle_last; + if ((angle_delta) < -1800) { + wrap_count += 1; + angle_delta += 3600; + } else if ((angle_delta) > 1800) { + wrap_count -= 1; + angle_delta -= 3600; + }; + angle_last = angle; + + angle_unclipped += angle_delta; + + // Clip with parameter range + angle_out += angle_delta; + if (active_mode->wrap_output) { + angle_out = mod(angle_out, 3600); // CHANGE to min, max + } else { + angle_out = static_cast(clip(angle_out, active_mode->min, active_mode->max)); + } +} + +void TorqueTuner::set_mode(int mode_idx) { + if (active_mode != mode_list[mode_idx]) { + if (active_mode != nullptr) active_mode->set_active(false); + active_mode = mode_list[mode_idx]; + active_mode->reset(angle); + active_mode->set_active(true); + angle_last = angle; + angle_out = 0; + angle_unclipped = 0; + set_defaults(active_mode); + + // Init discrete angle + // float resolution = active_mode->max / stretch; + // angle_discrete = floor(floor(angle_out / resolution) * resolution); + print_mode(static_cast(mode_idx)); + } +} + +void TorqueTuner::set_mode(MODE mode_) { + int mode_idx = static_cast(mode_); + set_mode(mode_idx); +} + +void TorqueTuner::set_stretch(float stretch_) { + if (abs(stretch_ - stretch) > 0.1) { + stretch = stretch_; + } +} + +void TorqueTuner::set_defaults(Mode * mode) { + scale = mode->scale_default; + stretch = mode->stretch_default; + target_velocity = mode->target_velocity_default; +} + +void TorqueTuner::print_mode(MODE mode_) { + printf("Switched mode to : \n"); + switch (mode_) { + case CLICK: + printf("Click \n"); + break; + case INERTIA: + printf("Inertia\n"); + break; + case WALL: + printf("Wall\n"); + break; + case MAGNET: + printf("Magnet\n"); + break; + case LINSPRING: + printf("Linear Spring \n"); + break; + case EXPSPRING: + printf("Exponential Spring \n"); + break; + case FREE: + printf("Free\n"); + break; + case SPIN: + printf("Spin \n"); + break; + case SERIAL_LISTEN: + printf("Serial listen \n"); + break; + } +} + +float TorqueTuner::calc_acceleration(float velocity_) { + static float last = 0; + acceleration = last - velocity_; + last = velocity_; + return acceleration; +} + +float TorqueTuner::filter(float x) { + // Cannonical form - https://ccrma.stanford.edu/~jos/filters/Direct_Form_II.html + // w[n] = x[n] - a1*w[n-1] - a2*w[n-2] + // y[n] = b0*w[n] + b1*w[n-1] + b2*w[n-2] + static float w[3]; + w[0] = x - a[1] * w[1] - a[2] * w[2]; + x = b[0] * w[0] + b[1] * w[1] + b[2] * w[2]; + w[2] = w[1]; + w[1] = w[0]; + return x; +} + +float TorqueTuner::gate(float val, float threshold, float floor) { + return abs(val) > threshold ? val : floor; +} + +void TorqueTuner::update_trig() { + trigger++; + trigger = fold(trigger, 0, 1); +} + +int32_t TorqueTuner::getTime() { + return esp_timer_get_time(); +} + +int16_t Wall::calc(void* ptr) { + TorqueTuner* knob = (TorqueTuner*)ptr; + float val = 0; + float delta_angle_min = (knob->angle_unclipped - min) / 10.0; + if (delta_angle_min < 0 && delta_angle_min > - threshold) { + val = WALL_TORQUE * stiffness * abs(delta_angle_min) - damping * knob->velocity; + } else { + float delta_angle_max = (knob->angle_unclipped - max) / 10.0; + if (delta_angle_max > 0 && delta_angle_max < threshold) { + val = -WALL_TORQUE * stiffness * abs(delta_angle_max) - damping * knob->velocity; + } + } + return static_cast (round(val)); +} + +int16_t Click::calc(void* ptr) { + TorqueTuner* knob = (TorqueTuner*)ptr; + float val; + if (knob->angle_out <= min) { + val = WALL_TORQUE; + } else if (knob->angle_out >= max) { + val = -WALL_TORQUE; + } else { + val = static_cast((tf_click_2[idx])) / TABLE_RESOLUTION * knob->scale; + } + return static_cast (round(val)); +} + +int16_t Magnet::calc(void* ptr) { + TorqueTuner* knob = (TorqueTuner*)ptr; + return static_cast(tf_magnet[idx]) / TABLE_RESOLUTION * knob->scale; // Magnet +} + +int16_t Inertia::calc(void* ptr) { + TorqueTuner* knob = (TorqueTuner*)ptr; + if (knob->velocity > 0) { + return round((- (knob->angle_out / 3600.0) * knob->velocity) * knob->scale / MAX_VELOCITY); + } else { + return 0; + } +} + +int16_t LinSpring::calc(void* ptr) { + TorqueTuner* knob = (TorqueTuner*)ptr; + float val = - (knob->angle_out - 1800) / 1800.0; + if (knob->angle_unclipped <= min) { + val = 1; + } else if (knob->angle_unclipped >= max) { + val = -1; + } + val *= knob->scale; + return static_cast (round(val)); +} + +int16_t ExpSpring::calc(void* ptr) { + TorqueTuner* knob = (TorqueTuner*)ptr; + float val = static_cast(tf_exp_spring[idx]) / TABLE_RESOLUTION; + + if (knob->angle_unclipped <= min) { + val = 1; + } else if (knob->angle_unclipped >= max) { + val = -1; + } + + val *= knob->scale; + return static_cast (round(val)); +} + + +int16_t Free::calc(void* ptr) { + TorqueTuner* knob = (TorqueTuner*)ptr; + return knob->scale; +} + +int16_t Spin::calc(void* ptr) { + TorqueTuner* knob = (TorqueTuner*)ptr; + return knob->target_velocity; +} + + SerialListen::SerialListen(): Mode(MAX_TORQUE) { + torqueIn = 0; + uart_config_t uart_config0 = { + .baud_rate = 115200, + .data_bits = UART_DATA_8_BITS, + .parity = UART_PARITY_DISABLE, + .stop_bits = UART_STOP_BITS_1, + .flow_ctrl = UART_HW_FLOWCTRL_DISABLE, //UART_HW_FLOWCTRL_CTS_RTS, + .rx_flow_ctrl_thresh = 122, + .source_clk = UART_SCLK_APB, + }; + + //Configure UART1 parameters + uart_param_config(0, &uart_config0); + + uart_set_pin(0, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE); + + //Install UART driver (we don't need an event queue here) + //In this example we don't even use a buffer for sending data. + uart_driver_install(0, UART_FIFO_LEN + 1, 0, 0, NULL, 0); + + xTaskCreate(serial_monitor, "serial_monitor", 2048, NULL, 10, NULL); +} + +int16_t SerialListen::calc(void* ptr) { + TorqueTuner* knob = (TorqueTuner*)ptr; + angleOut = knob->angle; + return torqueIn; +} + +void SerialListen::set_active(bool is_active) { + active = is_active; +} + +void SerialListen::serial_monitor(void *pvParameters) { + while(1) { + //Read torque ints from UART + serial_data_length = uart_read_bytes(0, serial_data, SERIAL_BUFSIZE, 20 / portTICK_RATE_MS); + if (serial_data_length > 0) { + serial_data_str = convertToString(serial_data); + memset(serial_data, 0, sizeof serial_data); + uart_flush(0); + } + + if (!active) continue; + + // Write angle to serial + std::string angleMessage = std::to_string(angleOut) + std::string(" "); + uart_write_bytes(0, angleMessage.data(), angleMessage.size() * sizeof(char)); + + // Interpret data + if (serial_data_str.empty()) { + continue; + } + // Convert torque value string to int + char *endptr; + const char *serial_data_cstr = serial_data_str.c_str(); + int possibleTorque = std::strtol(serial_data_cstr, &endptr, 10); + if (endptr == serial_data_cstr) { + uart_write_bytes(0, "bad\n", 4); + } else { + torqueIn = possibleTorque; + } + serial_data_str.clear(); + } +} + +// Calculates an index for the look-up table based transfer functions +int16_t Mode::calc_index(void* ptr) { + TorqueTuner* knob = (TorqueTuner*)ptr; + + state += static_cast (round(knob->angle_delta * knob->stretch)); + if (wrap_haptics) + { + idx = mod(state, 3600); + } else { + idx = clip(state, 0, 3600); + } + return idx; + +}; + +void Mode::reset(int16_t angle_) { + idx = offset; // apply mode specific offset to idx + state = 0; +}; + +// Hybrid mode - under construction diff --git a/software/src/main.cpp b/software/src/main.cpp new file mode 100644 index 0000000..026f157 --- /dev/null +++ b/software/src/main.cpp @@ -0,0 +1,695 @@ +//****************************************************************************// +// Torquetuner - firmware // +// SAT/Metalab // +// Input Devices and Music Interaction Laboratory (IDMIL), McGill University // +// Albert Niyonsenga and Christian Frisson (2022) // +//****************************************************************************// + +/* Created using the Puara template: https://github.com/Puara/puara-module-template + * The template contains a fully commented version for the commonly used commands + */ +//*****************************************************************************// +// INCLUDES Section + +//#define SPARKFUN_ESP32_THING_PLUS 1 +unsigned int firmware_version = 20221020; +// Define visual feedback +#define VISUAL_FEEDBACK +// Define libmapper +#define LIBMAPPER + +#include "Arduino.h" +#include "variants.h" + +// #include +#include +#include +#include +#include +//#include "Filter.h" +#include +#include +#include +// #include + +#ifndef SPARKFUN_ESP32_THING_PLUS +#include +#endif + +#include "haptics.h" + +// For disabling power saving +#include "esp_wifi.h" + +// Include Puara's module manager +// If using Arduino.h, include it before including puara.h +#include "puara.h" + +const int SEL_PIN = 0; + +#ifdef TSTICKJOINT +const int SDA_PIN = 26; +const int SCL_PIN = 25; +#else +#ifdef SPARKFUN_ESP32_THING_PLUS +const int SDA_PIN = 23; +const int SCL_PIN = 22; +#else +const int SDA_PIN = 21; +const int SCL_PIN = 22; +#endif +#endif +//**************************INITIALISE PUARA + MCU Libraries*********************// +// Initialise Puara +Puara puara; + +#ifndef SPARKFUN_ESP32_THING_PLUS +// Initialise the TinyPICO library +TinyPICO tp = TinyPICO(); +#endif + +//**************************INITIALISE LCD***************************************// +// LCD properties +#ifdef VISUAL_FEEDBACK + Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield(); + #define OFF 0x0 + #define RED 0x1 + #define YELLOW 0x3 + #define GREEN 0x2 + #define TEAL 0x6 + #define BLUE 0x4 + #define VIOLET 0x5 + #define WHITE 0x7 + int gui_state = 0; + int max_gui_state = 3; //0 = haptic mode, 1 = angle, 2 = velocity, 3 = torque + int old_gui_state = 0; + + +// Initial States +int STATE = 4; +int OLD_VALUE = 9999; +int OLD_STATE = 4; +int MAX_MOTOR_STATES = 8; + + +void print_state(int cur_state) { + lcd.setCursor(0,1); + if (cur_state == 0) { + lcd.print("CLICK"); + } + else if (cur_state == 1) { + lcd.print("MAGNET"); + } + else if (cur_state == 2) { + lcd.print("WALL"); + } + else if (cur_state == 3) { + lcd.print("INERTIA"); + } + else if (cur_state == 4) { + lcd.print("LINEAR SPRING"); + } + else if (cur_state == 5) { + lcd.print("EXP SPRING"); + } + else if (cur_state == 6) { + lcd.print("FREE"); + } + else if (cur_state == 7) { + lcd.print("SPIN"); + } + else if (cur_state == 8) { + lcd.print("SERIAL LISTEN"); + } + else { + lcd.print("Unknown State"); + } +} + +int CHANGE_STATE(int cur_state, int max_state, int inc_flag) { + int new_state = 0; + if (inc_flag) { + new_state = cur_state + 1; + } else{ + new_state = cur_state - 1; + } + if (new_state > max_state) { + new_state = 0; + } + if (new_state < 0) { + new_state = max_state; + } + printf("New State %d\n",new_state); + return new_state; +} + +const uint32_t DEBOUNCE_TIME = 10000; // 10 ms +bool update_btn(const int pin) { + static bool last_val; + static bool has_changed; + static int32_t last_change; + // Read button pin + int32_t now = esp_timer_get_time(); + bool val = !digitalRead(pin); + if (val != last_val) { + last_val = val; + last_change = now; + has_changed = true; + } + + // Debounce button and trigger on release + if (has_changed && (now - last_change) > DEBOUNCE_TIME && !val) { + has_changed = false; + return true; + } else { + return false; + } + +} + +bool update_btn_lcd(uint8_t buttonPressed){ + static bool last_val; + static bool has_changed; + static int32_t last_change; + // Read button pin + int32_t now = esp_timer_get_time(); + bool val = !buttonPressed; + if (val != last_val) { + last_val = val; + last_change = now; + has_changed = true; + } + + // Debounce button and trigger on release + if (has_changed && (now - last_change) > DEBOUNCE_TIME && !val) { + has_changed = false; + return true; + } else { + return false; + } + +} +#endif +//*************************SET UP TORQUETUNER************************************// +// I2C variables +const uint8_t I2C_BUF_SIZE = 10; +const uint8_t CHECKSUMSIZE = 2; +uint8_t tx_data[I2C_BUF_SIZE+CHECKSUMSIZE]; +uint8_t rx_data[I2C_BUF_SIZE+CHECKSUMSIZE]; +uint16_t checksum_rx = 0; +uint16_t checksum_tx = 0; + +// Initialize TorqueTuner +TorqueTuner knob; + +// State flags +int connected = 0; +bool is_playing = true; + +//========TORQUETUNER FUNCTIONS======== +uint16_t calcsum(uint8_t buf[], uint8_t length) { + uint16_t val = 0; + for (int k = 0; k < length; k++) { + val += buf[k]; + } + return val; +} + +int read_param(float * param, uint8_t* data, uint8_t length) { + memcpy(param, data, length); + if ( std::isnan(*param)) { + return 1; + } else { + return 0; + } +} + +int receiveI2C(TorqueTuner * knob_) { + Wire.requestFrom(8, I2C_BUF_SIZE + CHECKSUMSIZE); + uint8_t k = 0; + while (Wire.available()) { + rx_data[k] = Wire.read(); + k++; + } + if (k != I2C_BUF_SIZE + CHECKSUMSIZE) { // check if all data is recieved + //printf("Error in recieved data. Bytes missing : %i\n", I2C_BUF_SIZE + CHECKSUMSIZE - k); + return 1; + } + else { + memcpy(&checksum_rx, rx_data + I2C_BUF_SIZE, 2); // read checksum + if (checksum_rx != calcsum(rx_data, I2C_BUF_SIZE)) { // error in recieved data + return 2; + } + else { // Succesfull recieve + #ifdef MECHADUINO + memcpy(&knob_->angle, rx_data, 2); + #endif + #ifdef MOTEUS + memcpy(&knob_->angle, rx_data + 1, 2); + #endif + memcpy(&knob_->velocity, rx_data + 4, 4); + //printf("Angle %d Velocity %f\n",knob_->angle,knob_->velocity ); + return 0; //Return 0 if no error has occured + } + } +} + +void sendI2C(TorqueTuner * knob_) { + Wire.beginTransmission(8); // transmit to device #8 + memcpy(tx_data, &knob_->torque, 2); + memcpy(tx_data + 2, &knob_->target_velocity, 4); + memcpy(tx_data + 6, &knob_->active_mode->pid_mode, 1); + checksum_tx = calcsum(tx_data, I2C_BUF_SIZE); + memcpy(tx_data + I2C_BUF_SIZE , &checksum_tx, 2); + //printf("Torque %d Angle %d Velocity %f Target %f Mode %c\n",knob_->torque,knob_->angle,knob_->velocity,knob_->target_velocity,knob_->active_mode->pid_mode); + int n = Wire.write(tx_data, I2C_BUF_SIZE + CHECKSUMSIZE); + Wire.endTransmission(); // stop transmitting +} +//*************************SET UP LIBMAPPER**************************************// +#ifdef LIBMAPPER +// Libmapper variables +mpr_sig in_sig_scale; +mpr_sig in_sig_stretch; +mpr_sig in_sig_mode; +mpr_sig in_sig_target_velocity; +mpr_sig in_sig_offset; +mpr_sig in_sig_damping; + +mpr_sig out_sig_angle; +mpr_sig out_sig_velocity; +mpr_sig out_sig_trigger; +mpr_sig out_sig_speed; +mpr_sig out_sig_quant_angle; +mpr_sig out_sig_acceleration; +mpr_dev dev; + +int pressure = 0; +int sel = 0; +int sel_min = 0; +int sel_max = 0; + +// System variables +int err = 0; +int err_count = 0; +uint32_t last_time = 0; +uint32_t last_time_libmapper_poll = 0; +uint32_t last_time_libmapper_update = 0; +uint32_t last_time_errprint = 0; +uint32_t last_time_maintenance = 0; +uint32_t last_time_gui = 0; +uint32_t now = 0; + +//========Setup Libmapper Signals======== +void in_sig_scale_callback(mpr_sig sig, mpr_sig_evt evt, mpr_id inst, int length, mpr_type type, const void* value, mpr_time time) { + knob.scale = *((float*)value); +} + +void in_sig_stretch_callback(mpr_sig sig, mpr_sig_evt evt, mpr_id inst, int length, mpr_type type, const void* value, mpr_time time) { + knob.stretch = *((float*)value); +} + +void in_sig_offset_callback(mpr_sig sig, mpr_sig_evt evt, mpr_id inst, int length, mpr_type type, const void* value, mpr_time time) { + knob.active_mode->offset = (*((float*)value)); + //printf("Offset: %f", knob.active_mode->offset); +} + +void in_sig_mode_callback(mpr_sig sig, mpr_sig_evt evt, mpr_id inst, int length, mpr_type type, const void* value, mpr_time time) { + knob.set_mode(*((int32_t*)value)); +} + +void in_sig_target_velocity_callback(mpr_sig sig, mpr_sig_evt evt, mpr_id inst, int length, mpr_type type, const void* value, mpr_time time) { + knob.target_velocity = (*((float*)value)); + //printf("Target Velocity: %f", knob.target_velocity); +} + +void in_sig_damping_callback(mpr_sig sig, mpr_sig_evt evt, mpr_id inst, int length, mpr_type type, const void* value, mpr_time time) { + knob.active_mode->damping = (*((float*)value)); +} + + +void init_mpr_sigs() { + dev = mpr_dev_new(puara.get_dmi_name().c_str(), 0); + + // Init libmapper inputs + float scale_min = -230; + float scale_max = 230; + in_sig_scale = mpr_sig_new(dev, MPR_DIR_IN, "Scale", 1, MPR_FLT, "Ncm", &scale_min, &scale_max, 0, in_sig_scale_callback, MPR_SIG_UPDATE); + + float angle_scale_min = 0; + float angle_scale_max = 30; + in_sig_stretch = mpr_sig_new(dev, MPR_DIR_IN, "Stretch", 1, MPR_FLT, "ratio", &angle_scale_min, &angle_scale_max, 0, in_sig_stretch_callback, MPR_SIG_UPDATE); + + int mode_min = 0; + int mode_max = knob.num_modes - 1; + sel_max = mode_max; + in_sig_mode = mpr_sig_new(dev, MPR_DIR_IN, "Mode", 1, MPR_INT32, "mode", &mode_min, &mode_max, 0, in_sig_mode_callback, MPR_SIG_UPDATE); + + float vel_min = -700; + float vel_max = 700; + in_sig_target_velocity = mpr_sig_new(dev, MPR_DIR_IN, "TargetVelocity", 1, MPR_FLT, "Rpm", &vel_min, &vel_max, 0, in_sig_target_velocity_callback, MPR_SIG_UPDATE); + + float offset_min = -1800; + float offset_max = 1800; + in_sig_offset = mpr_sig_new(dev, MPR_DIR_IN, "Offset", 1, MPR_FLT, "degrees", &offset_min, &offset_max, 0, in_sig_offset_callback, MPR_SIG_UPDATE); + + float damping_min = -1; + float damping_max = 1; + in_sig_damping = mpr_sig_new(dev, MPR_DIR_IN, "Damping", 1, MPR_FLT, "ratio", &offset_min, &offset_max, 0, in_sig_damping_callback, MPR_SIG_UPDATE); + + // Init libmapper outputs + int angle_min = 0; + int angle_max = 3600; + out_sig_angle = mpr_sig_new(dev, MPR_DIR_OUT, "Angle", 1, MPR_INT32, 0, &angle_min, &angle_max, 0, 0, 0); + + out_sig_velocity = mpr_sig_new(dev, MPR_DIR_OUT, "Velocity", 1, MPR_FLT, 0, &vel_min, &vel_max, 0, 0, 0); + + int trig_min = 0; + int trig_max = 1; + out_sig_trigger = mpr_sig_new(dev, MPR_DIR_OUT, "Trigger", 1, MPR_INT32, 0, &trig_min, &trig_max, 0, 0, 0); + + float speed_min = 0; + float speed_max = vel_max; + out_sig_speed = mpr_sig_new(dev, MPR_DIR_OUT, "Speed", 1, MPR_FLT, 0, &speed_min, &speed_max, 0, 0, 0); + + out_sig_quant_angle = mpr_sig_new(dev, MPR_DIR_OUT, "QuantAngle", 1, MPR_INT32, 0, &angle_min, &angle_max, 0, 0, 0); + + float acc_min = -100; + float acc_max = 100; + out_sig_acceleration = mpr_sig_new(dev, MPR_DIR_OUT, "Acceleration", 1, MPR_FLT, 0, &acc_min, &acc_max, 0, 0, 0); + + mpr_dev_poll(dev, 50); + +} +#endif +//*************************SET UP OSC********************************************// +// Setup OSC signals +/* + * Creating liblo addresses for sending direct OSC messages. + * Those will be populated with IP address and port provided + * by the puara module manager. + */ +lo_address osc1; +lo_address osc2; +std::string baseNamespace = "/"; +std::string oscNamespace; + +// Declare a new liblo server and set an error callback +void error(int num, const char *msg, const char *path) { + printf("Liblo server error %d in path %s: %s\n", num, path, msg); + fflush(stdout); +} +lo_server_thread osc_server; + +/* + * Generic handler that catches any incoming messages and display them. + * Returning 1 means that the message has not been fully handled and the server + * should try other methods. + * (based on https://github.com/radarsat1/liblo/blob/master/examples/example_server.c) + */ +int generic_handler(const char *path, const char *types, lo_arg ** argv, + int argc, lo_message data, void *user_data) { + int i; + + printf("OSC message received; path: %s\n", path); + for (i = 0; i < argc; i++) { + printf("arg %d '%c' ", i, types[i]); + lo_arg_pp((lo_type)types[i], argv[i]); + printf("\n"); + } + printf("\n"); + fflush(stdout); + + return 1; +} + +//*********************TASK SCHEDULING*******************************************// +// Timing variables +const uint32_t LIBMAPPER_POLL_RATE = 10000 ; // us +const uint32_t LIBMAPPER_UPDATE_RATE = 10000 ; // us +const uint32_t OSC_UPDATE_RATE = 40000 ; // us +const uint32_t HAPTICS_UPDATE_RATE = 500 ; // 2 KHz +const uint32_t I2CUPDATE_FREQ = 3400000; // high speed mode; +const uint32_t GUI_RATE = 66000; // 15 FPS +const uint32_t INPUT_READ_RATE = 1000; // 1kHz + +Scheduler runnerHaptics; +Scheduler runnerComms; +#ifdef LIBMAPPER +void pollLibmapper(); +void updateLibmapper(); +#endif +#ifdef VISUAL_FEEDBACK +void updateDisplay(); +void readInputs(); +#endif +void updateHaptics(); +void reconnectWifi(); +void updateOSC(); +// Comms Tasks +#ifdef LIBMAPPER +Task libmapperPoll (LIBMAPPER_POLL_RATE, TASK_FOREVER, &pollLibmapper, &runnerComms,true); +Task libmapperUpdate (LIBMAPPER_UPDATE_RATE, TASK_FOREVER, &updateLibmapper, &runnerComms,true); +#endif +Task OSCupdate (OSC_UPDATE_RATE, TASK_FOREVER, &updateOSC, &runnerComms,true); + +// Haptic Tasks +Task HapticUpdate (HAPTICS_UPDATE_RATE, TASK_FOREVER, &updateHaptics, &runnerHaptics,true); +#ifdef VISUAL_FEEDBACK +Task DisplayUpdate (GUI_RATE, TASK_FOREVER, &updateDisplay, &runnerHaptics,true); +Task InputRead (INPUT_READ_RATE,TASK_FOREVER,&readInputs, &runnerHaptics,true); +#endif +//==========Functions for task scheduler=========== +#ifdef LIBMAPPER +void pollLibmapper() { + mpr_dev_poll(dev, 0); +} + +void updateLibmapper () { + // Update libmapper outputs + mpr_sig_set_value(out_sig_angle, 0, 1, MPR_INT32, &knob.angle_out); + mpr_sig_set_value(out_sig_velocity, 0, 1, MPR_FLT, &knob.velocity); + mpr_sig_set_value(out_sig_trigger, 0, 1, MPR_INT32, &knob.trigger); + float speed = abs(knob.velocity); + mpr_sig_set_value(out_sig_speed, 0, 1, MPR_FLT, &speed); + mpr_sig_set_value(out_sig_quant_angle, 0, 1, MPR_INT32, &knob.angle_discrete); + mpr_sig_set_value(out_sig_acceleration, 0, 1, MPR_FLT, &knob.acceleration); + mpr_dev_update_maps(dev); +} +#endif + +#ifdef VISUAL_FEEDBACK +void updateDisplay() { + if ((gui_state == 0) && ((STATE != OLD_STATE) || (old_gui_state != gui_state))){ + if (old_gui_state != gui_state) { + old_gui_state = 0; + } + if (STATE != OLD_STATE) { + OLD_STATE = STATE; + } + + lcd.clear(); + lcd.print("Haptic Effect"); + print_state(STATE); + + } +} + +void readInputs() { + // Check buttons + uint8_t buttons = lcd.readButtons(); + bool button_pressed = update_btn_lcd(buttons); + if (button_pressed) { + if ((buttons & BUTTON_SELECT) || (buttons & BUTTON_RIGHT)) { + OLD_STATE = STATE; + STATE = CHANGE_STATE(STATE,MAX_MOTOR_STATES,1); + knob.set_mode(STATE); + } + if (buttons & BUTTON_LEFT) { + OLD_STATE = STATE; + STATE = CHANGE_STATE(STATE,MAX_MOTOR_STATES,0); + knob.set_mode(STATE); + } + } +} +#endif + +void updateHaptics() { + // Recieve Angle and velocity from servo + err = receiveI2C(&knob); + if (err) { + //printf("i2c error \n"); + } + else { + // Update torque if valid angle measure is recieved. + if (is_playing) { + knob.update(); + } else { + // OBS: Consider not updating? assign last last value instead? // + knob.torque = 0; + knob.target_velocity = 0; + } + sendI2C(&knob); + } +} + +void updateOSC() { + // Sending continuous OSC messages + if (puara.IP1_ready()) { + oscNamespace.replace(oscNamespace.begin()+baseNamespace.size(),oscNamespace.end(), "instrument/angle_out"); + lo_send(osc1, oscNamespace.c_str(), "i", knob.angle_out); + oscNamespace.replace(oscNamespace.begin()+baseNamespace.size(),oscNamespace.end(), "instrument/velocity"); + lo_send(osc1, oscNamespace.c_str(), "f", knob.velocity); + oscNamespace.replace(oscNamespace.begin()+baseNamespace.size(),oscNamespace.end(), "instrument/trigger"); + lo_send(osc1, oscNamespace.c_str(), "i", knob.trigger); + oscNamespace.replace(oscNamespace.begin()+baseNamespace.size(),oscNamespace.end(), "instrument/speed"); + float speed = abs(knob.velocity); + lo_send(osc1, oscNamespace.c_str(), "f", speed); + oscNamespace.replace(oscNamespace.begin()+baseNamespace.size(),oscNamespace.end(), "instrument/angle_discrete"); + lo_send(osc1, oscNamespace.c_str(), "i", knob.angle_discrete); + oscNamespace.replace(oscNamespace.begin()+baseNamespace.size(),oscNamespace.end(), "instrument/accl"); + lo_send(osc1, oscNamespace.c_str(), "f", knob.acceleration); + } + if (puara.IP2_ready()) { + oscNamespace.replace(oscNamespace.begin()+baseNamespace.size(),oscNamespace.end(), "instrument/angle_out"); + lo_send(osc1, oscNamespace.c_str(), "i", knob.angle_out); + oscNamespace.replace(oscNamespace.begin()+baseNamespace.size(),oscNamespace.end(), "instrument/velocity"); + lo_send(osc1, oscNamespace.c_str(), "f", knob.velocity); + oscNamespace.replace(oscNamespace.begin()+baseNamespace.size(),oscNamespace.end(), "instrument/trigger"); + lo_send(osc1, oscNamespace.c_str(), "i", knob.trigger); + oscNamespace.replace(oscNamespace.begin()+baseNamespace.size(),oscNamespace.end(), "instrument/speed"); + float speed = abs(knob.velocity); + lo_send(osc1, oscNamespace.c_str(), "f", speed); + oscNamespace.replace(oscNamespace.begin()+baseNamespace.size(),oscNamespace.end(), "instrument/angle_discrete"); + lo_send(osc1, oscNamespace.c_str(), "i", knob.angle_discrete); + oscNamespace.replace(oscNamespace.begin()+baseNamespace.size(),oscNamespace.end(), "instrument/accl"); + lo_send(osc1, oscNamespace.c_str(), "f", knob.acceleration); + } +} + +// Set up multithreading +#define HAPTIC_CPU 0 +#define COMMS_CPU 1 + +// ===== rtos task handles ========================= +TaskHandle_t tHaptics; +TaskHandle_t tMappings; + +// Mappings +void tHapticTasks(void* parameters) { + for(;;){ + runnerHaptics.execute(); + } +} + +void tMappingTasks(void* parameters) { + for(;;){ + runnerComms.execute(); + } +} + +void createCoreTasks() { + xTaskCreatePinnedToCore( + tHapticTasks, + "haptics", + 8096, + NULL, + 2, + &tHaptics, + HAPTIC_CPU); + + xTaskCreatePinnedToCore( + tMappingTasks, /* Task function. */ + "comms", /* name of task. */ + 10000, /* Stack size of task */ + NULL, /* parameter of the task */ + 2, /* priority of the task */ + &tMappings, /* task handle */ + COMMS_CPU); +} + + + + +//*************************************SETUP*************************************// +void setup() { + #ifdef VISUAL_FEEDBACK + // Setup LCD + lcd.begin(16,2); + lcd.print("Booting up"); + #endif + + // // Start serial + // Serial.begin(115200); + + // Start Puara + puara.start(); + puara.set_version(firmware_version); + baseNamespace.append(puara.get_dmi_name()); + baseNamespace.append("/"); + oscNamespace = baseNamespace; + + // Populating liblo addresses and server port + std::cout << " Initializing Liblo server/client... "; + osc1 = lo_address_new(puara.getIP1().c_str(), puara.getPORT1Str().c_str()); + osc2 = lo_address_new(puara.getIP2().c_str(), puara.getPORT2Str().c_str()); + osc_server = lo_server_thread_new(puara.getLocalPORTStr().c_str(), error); + + // Add method that will match any path and args and start server + lo_server_thread_add_method(osc_server, NULL, NULL, generic_handler, NULL); + lo_server_thread_start(osc_server); + std::cout << "done" << std::endl; + + + #ifdef LIBMAPPER + std::cout << " Initializing Libmapper device/signals... "; + init_mpr_sigs(); + std::cout << "done" << std::endl; + #endif + + Wire.begin(SDA_PIN, SCL_PIN); + Wire.setClock(I2CUPDATE_FREQ); // Fast mode plus + + // Make a reading for initilization + int err = 1; + #ifdef VISUAL_FEEDBACK + lcd.clear(); + lcd.print("Waiting for I2C"); + #endif + while (err) { + err = receiveI2C(&knob); + #ifdef VISUAL_FEEDBACK + lcd.setCursor(0, 1); + lcd.print(millis()/1000); + #endif + } + knob.set_mode(TorqueTuner::LINSPRING); + + // Show current haptic effect + #ifdef VISUAL_FEEDBACK + gui_state = 0; + old_gui_state = 0; + lcd.clear(); + lcd.setCursor(0,0); + lcd.print("Haptic Effect"); + print_state(STATE); + #endif + + pinMode(SEL_PIN, INPUT); + + // Print Stuff to Serial + // Using Serial.print and delay to prevent interruptions + delay(500); + Serial.println(); + Serial.println(puara.get_dmi_name().c_str()); + Serial.println("Edu Meneses\nMetalab - Société des Arts Technologiques (SAT)\nIDMIL - CIRMMT - McGill University"); + Serial.print("Firmware version: "); Serial.println(firmware_version); Serial.println("\n"); + + // Create tasks + createCoreTasks(); + +} + +void loop() { + //runnerHaptics.execute(); + //runnerComms.execute(); +} \ No newline at end of file diff --git a/software/test/README b/software/test/README new file mode 100644 index 0000000..9b1e87b --- /dev/null +++ b/software/test/README @@ -0,0 +1,11 @@ + +This directory is intended for PlatformIO Test Runner and project tests. + +Unit Testing is a software testing method by which individual units of +source code, sets of one or more MCU program modules together with associated +control data, usage procedures, and operating procedures, are tested to +determine whether they are fit for use. Unit testing finds problems early +in the development cycle. + +More information about PlatformIO Unit Testing: +- https://docs.platformio.org/en/latest/advanced/unit-testing/index.html