Open stvhawes opened 1 week ago
I don't think there's any urgency since there are awesome working examples.
I'll try my hand at some fixes. Some are probably already fixed (tests were on 12 June main-branch), and if not then very likely to be addressed before I get to them.
Hi! Thanks for this work!
Most of your errors are caused by running an example setup for using an SD card in your Tympan, but you must not have an SD card. If you used an SD card, more than half your errors would go away.
Also, you got an error on the example for renaming the Bluetooth module. As the comments in the code say, and as your own comment say, this example only works for older versions of the Tympan. It is not indebted for use with Rev F.
You also got a bunch of errors on the Deprecated examples. These are not expected to work. Instead of calling them "deprecated", I probably should have called them "soon to be deleted".
Finally, there are all of the other errors that you found. These are more troubling and surprising to me. Prior to the release of Rev F, I recompiled all of the Tympan examples myself and they all worked at that time. I'll go back and try to recompile them myself in the next couple days.
What tool chain were you using to compile and test all of these? You didn't do them all manually like I did, did you? You must have done the testing in some automated manner? Did you set up a continuous integration system? I'm very curious!
Chip
:) manual. Felt like a good way to sense the scale and breadth of the library, while looking for a few favourite examples to focus on.
Also, I didn't expect you would have been able to watch all the examples on every update. Automation would be nice but not easy when there's the specific hardware (and past versions of the hardware). Benefit to audiologists would the key purpose of the library rather than software complexity..
I have yet to fix anything .. but I did make a fork and try out the PR pathway.
Yep, sourcing a microSD did fix the runtime issues, and really brought my Tympan on!
Meanwhile I've run through the compile-issues and worked out a proposed fix for each. I've tested as best I can but might have misunderstood the purpose and capabilities of an example (so incomplete fix).
Pull request: https://github.com/Tympan/Tympan_Library/pull/78
@chipaudette (or other maintainer!) please can you review the PR #78.
If you decide to copy some or any fixes over to another branch and merge from there I won't be offended. If I should click to merge through (if I have permissions) then please instruct.
Nice Pull Request! Thanks so much for the fixes!
New to the project, so while familiarising myself with the code I tried every (non-deprecated) example.
The compile-fails especially could be my libraries setup rather than any particular issue. Run errors perhaps because there was a hardware item I should have plugged in...
Compiles and runs and query-favourite
./03-Intermediate/WDRC_FIR_8Band/WDRC_FIR_8Band.ino okay serial monitor in + out ./05-FullSystems/WDRC_8BandFIR_full/WDRC_8BandFIR_full.ino okay serial monitor in and out also tested sweep .. good ./06-AppTutorial/BasicGain_wApp/BasicGain_wApp.ino okay serial monitor out
Compiles and runs, no problemo
./01-Basic/BasicGain/BasicGain.ino okay serial monitor out ./01-Basic/TrebleBoost/TrebleBoost.ino okay serial monitor out CPU Cur/Pk: 0.6%/0.6%, MEM Cur/Pk: 4/6, FreeRAM(B) 499712 ./01-Basic/TrebleBoost_wComp/TrebleBoost_wComp.ino okay serial monitor out printGainStatus: Input PGA = 20.0 dB. Compressor Gain (L/R) = 0.0, 0.0 dB. CPU Cur/Pk: 2.2%/2.3%, MEM Cur/Pk: 4/8, FreeRAM(B) 499712 ./01-Basic/AudioPassThru/AudioPassThru.ino okay serial monitor out ./01-Basic/PrintCPUandMemoryUsage/PrintCPUandMemoryUsage.ino okay serial monitor out CPU Cur/Pk: 0.4%/0.4%, MEM Cur/Pk: 4/6, FreeRAM(B) 499712 ./01-Basic/ChangeSampleRate/ChangeSampleRate.ino okay serial monitor out ./02-Utility/SD_Card/SDWriter_wApp_wMTP/SDWriter_wApp_wMTP.ino okay serial monitor in + out ./02-Utility/SD_Card/SDWavPlayer/SDWavPlayer.ino
For access to WAV files, please visit https://www.pjrc.com/teensy/td_libs_AudioDataFiles.html. repeat loop: Starting audio player: SDTEST1.WAV
./02-Utility/SD_Card/SDWriter/SDWriter.ino To Start Recording: Turn the volume pot all the way up. To Stop Recording: Turn the volume pot all the way down. serviceMicDetect: detected removal of plug-in microphone. On-board PCB mics now active.
./02-Utility/MyAudioAlgorithm/MyAudioAlgorithm.ino okay serial monitor out ./02-Utility/RamWavPlayer/RamWavPlayer.ino okay serial monitor out Starting sample 'YES'...len = 12000 samples Starting sample 'NO'...len = 12000 samples
./02-Utility/ControlViaSerial/ControlViaSerial.ino okay serial monitor in and out ./02-Utility/OutputTone/OutputTone.ino okay serial monitor out Changing to start tone, amplitude = 0.01 Changing to start silence... Changing to start tone, amplitude = 0.03 ./02-Utility/LongAudioBlocks/LongAudioBlocks.ino okay serial monitor out : Sample rate = 44100.00 Hz : block size = 1024 samples per channel CPU Cur/Pk: 0.5%/0.5%, MEM Cur/Pk: 4/6 ./02-Utility/Bluetooth/Tympan_Test_BLE_nRF52/Tympan_Test_BLE_nRF52.ino okay serial monitor in and out ./02-Utility/Bluetooth/Tympan_Test_BLE/Tympan_Test_BLE.ino okay serial monitor in and out serialManager: BLE: Name from module = Tympan-6D4E
./04-FrequencyDomain/NoiseReduction_FD/NoiseReduction_FD.ino okay serial monitor in and out ./03-Intermediate/Equalizer_8BandBiquad/Equalizer_8BandBiquad.ino okay serial monitor in + out ./04-FrequencyDomain/FrequencyCompression_FD/FrequencyCompression_FD.ino okay serial monitor in and out ./04-FrequencyDomain/GenericFreqDomainExample_FD/GenericFreqDomainExample_FD.ino okay serial monitor in and out
./06-AppTutorial/TrebleBoost_wComp_wApp/TrebleBoost_wComp_wApp.ino okay serial monitor out ./06-AppTutorial/TrebleBoost_wApp/TrebleBoost_wApp.ino okay serial monitor out ./06-AppTutorial/TrebleBoost_wApp_Alt/TrebleBoost_wApp_Alt.ino okay serial monitor out still: TrebleBoost_wApp: Starting setup() needs 'alt'
./08-Earpieces/EarpieceManualMixing_wSD/EarpieceManualMixing_wSD.ino okay serial monitor out ./08-Earpieces/OutputTone_wEarpieces/OutputTone_wEarpieces.ino okay serial monitor out ./08-Earpieces/AudioPassThru_wEarpieces/AudioPassThru_wEarpieces.ino okay serial monitor out add aic shield... earbuds in shield's output ./07-AIC_Shield/TrebleBoost_wComp_Quad/TrebleBoost_wComp_Quad.ino okay serial monitor out ./07-AIC_Shield/SDWriter_Quad_wApp/SDWriter_Quad_wApp.ino okay serial monitor out + in ./07-AIC_Shield/AudioPassThru_Quad/AudioPassThru_Quad.ino okay serial monitor out
Compiles, errors during run
./02-Utility/SD_Card/SDWriter_wApp_wLog/SDWriter_wApp_wLog.ino Setup: SD configured for 2 channels. error: setup: SD begin failed! SdError: 0X17,0X0
./02-Utility/SD_Card/SdPlay_and_SDWrite/SdPlay_and_SDWrite.ino okay serial monitor in + out Received: starting SD Player for PLAY1.WAV... AudioSDPlayer_F32: cannot open SD. AudioSDPlayer_F32: cannot open SD. Received: stopping the playing of any SD files... error: SDWriter: begin failed SdError: 0X17,0X0 ./02-Utility/SD_Card/SDWriter_wApp/SDWriter_wApp.ino okay compile and writes to monitor retest: seemed to crash not responsive; write to SD card ./02-Utility/RenameTympanBT/RenameTympanBT.ino okay serial monitor out
=> maybe failng because Rev F (not sure) ./02-Utility/TympanPDMMics/TympanPDMMics.ino okay serial monitor in and out // -Select from PCB mic, line in, or digital PDM mic // -Pass thru audio // -SD recording // -Control heaphone output volume
Received: begin SD recording error: SDWriter: begin failed SdError: 0X17,0X0
./04-FrequencyDomain/SpectrumAndCepstrum_FD/SpectrumAndCepstrum_FD.ino okay serial monitor out // I had a note of this failing - maybe it matters what was uploaded before this sketch ./08-Earpieces/TrebleBoost_wComp_wEarpieces_wApp/TrebleBoost_wComp_wEarpieces_wApp.ino okay serial monitor out deploys ok, but errors on monitor AudioControlAIC3206: Received Error During goToPage(): Error = 2 AudioControlAIC3206: Received Error During goToPage(): Error = 2 AudioControlAIC3206: Received Error During writeRegister(): Error = 2 AudioControlAIC3206: Received Error During writeRegister(): Error = 2
./09-FeedbackCancellation/01-BasicGain_wAFC_NLMS/01-BasicGain_wAFC_NLMS.ino okay serial monitor out ref: PDF: https://github.com/BoysTownOrg/chapro/blob/master/chapro.pdf should also have seriual monitor control but logging too much for the 'h' help screen to be visible AudioFeedbackCancelNFXLMS_F32: falling behind? in_block = 999999, ring block = 999999 ./09-FeedbackCancellation/02-BasicGain_wAFC_NFXLMS/02-BasicGain_wAFC_NFXLMS.ino okay serial monitor out // same as 01-BasicGain_wAFC_NLMS.ino ... 'h' output not visible because default logging is too much ( * TYMPAN HARDWARE: This example has only been tested on Tympan RevE. )
Compile fail
./02-Utility/DetectExtMic/DetectExtMic.ino DetectExtMic:21: error: 'audio_settings' was not declared in this scope 21 | Tympan myTympan(TympanRev::F, audio_settings); //do TympanRev::D or E or F | ^
~~~~~ Multiple libraries were found for "SD.h" Used: /Rosie/Hawesy/arduino-1.8.19/hardware/teensy/avr/libraries/SD Not used: /Rosie/Hawesy/arduino-1.8.19/libraries/SD 'audio_settings' was not declared in this scope./02-Utility/SoundLevelMeter/SoundLevelMeter.ino SoundLevelMeter:32: error: 'i2s_in' was not declared in this scope 32 | AudioConnection_F32 patchCord1(i2s_in, 0, freqWeight1, 0); //connect the Left input to frequency weighting | ^
~SoundLevelMeter:34: error: 'i2s_in' was not declared in this scope 34 | AudioConnection_F32 patchCord3(i2s_in, 0, i2s_out, 0); //echo the original signal to the left output | ^~Multiple libraries were found for "SD.h" Used: /Rosie/Hawesy/arduino-1.8.19/hardware/teensy/avr/libraries/SD Not used: /Rosie/Hawesy/arduino-1.8.19/libraries/SD 'i2s_in' was not declared in this scope ./03-Intermediate/WDRC_SingleBand/WDRC_SingleBand.ino WDRC_SingleBand:23: error: 'audio_settings' was not declared in this scope 23 | Tympan myTympan(TympanRev::F, audio_settings); //do TympanRev::D or E or F | ^~~~~~ Multiple libraries were found for "SD.h" Used: /Rosie/Hawesy/arduino-1.8.19/hardware/teensy/avr/libraries/SD Not used: /Rosie/Hawesy/arduino-1.8.19/libraries/SD 'audio_settings' was not declared in this scope./04-FrequencyDomain/FormantShifter_FD/FormantShifter_FD.ino nope FormantShifter_FD:49: error: 'audioHardware' was not declared in this scope 49 | SerialManager serialManager(audioHardware); | ^
~~~~ FormantShifter_FD: In function 'void switchToPCBMics()': FormantShifter_FD:50: error: 'audioHardware' was not declared in this scope 50 | #define mySerial audioHardware //audioHardware is a printable stream! | ^~~~~./04-FrequencyDomain/PitchShifter_FD/PitchShifter_FD.ino nope pitchShifter_FD: In function 'void switchToPCBMics()': PitchShifter_FD:114: error: 'audioHardware' was not declared in this scope 114 | audioHardware.inputSelect(TYMPAN_INPUT_ON_BOARD_MIC); // use the microphone jack - defaults to mic bias OFF | ^
~~~~ PitchShifter_FD: In function 'void switchToLineInOnMicJack()': PitchShifter_FD:119: error: 'audioHardware' was not declared in this scope 119 | audioHardware.inputSelect(TYMPAN_INPUT_JACK_AS_LINEIN); // use the microphone jack - defaults to mic bias OFF ./04-FrequencyDomain/FrequencyShifter_FD/FrequencyShifter_FD.ino nope FrequencyShifter_FD:59: error: 'audioHardware' was not declared in this scope 59 | SerialManager serialManager(audioHardware); | ^~~~~ ./04-FrequencyDomain/LowpassFilter_FD/LowpassFilter_FD.ino nope In file included from /Stephen/tympan-repo/libraries/Tympan_Library/examples/04-FrequencyDomain/LowpassFilter_FD/LowpassFilter_FD.ino:18: /Stephen/tympan-repo/libraries/Tympan_Library/examples/04-FrequencyDomain/LowpassFilter_FD/AudioEffectLowpass_FD_F32.h: In member function 'virtual void AudioEffectLowpass_FD_F32::update()': AudioEffectLowpass_FD_F32.h:99: error: no matching function for call to 'IFFT_Overlapped_F32::execute(float32_t&)' 99 | audio_block_f32_t out_audio_block = myIFFT.execute(complex_2N_buffer); //out_block is pre-allocated in here. ./05-FullSystems/WDRC_8BandFIR_Stereo_wApp/WDRC_8BandFIR_Stereo_wApp.ino nope WDRC_8BandFIR_Stereo_wApp:66: error: 'serialManager' was not declared in this scope; did you mean 'SerialManager'? 66 | State myState(&audio_settings, &myTympan, &serialManager); //keeping one's state is useful for the App's GUI | ^~~~~ | SerialManager WDRC_8BandFIR_Stereo_wApp: In function 'void setupSerialManager()': WDRC_8BandFIR_Stereo_wApp:107: error: 'serialManager' was not declared in this scope; did you mean 'SerialManager'? 107 | serialManager.add_UI_element(&myState);./05-FullSystems/WDRC_NBand_Stereo_Earpiece_Prescrip_wApp/WDRC_NBand_Stereo_Earpiece_Prescrip_wApp.ino compile errors but did seekec to upload and run... Compile errors .. In file included from /Stephen/tympan-repo/libraries/Tympan_Library/examples/05-FullSystems/WDRC_NBand_Stereo_Earpiece_Prescrip_wApp/WDRC_NBand_Stereo_Earpiece_Prescrip_wApp.ino:67: /Stephen/tympan-repo/libraries/Tympan_Library/examples/05-FullSystems/WDRC_NBand_Stereo_Earpiece_Prescrip_wApp/BTNRH_PresetManager_UI.h: In member function 'virtual int BTNRH_Preset::interpolateSettingsGivenFrequencies(const BTNRH_Preset&, int, float*)': BTNRH_PresetManager_UI.h:43: warning: unused variable 'old_n_crossover' 43 | int old_n_crossover = old_n_chan-1; | ^
~~~~~~ In file included from /Stephen/tympan-repo/libraries/Tympan_Library/examples/05-FullSystems/WDRC_NBand_Stereo_Earpiece_Prescrip_wApp/WDRC_NBand_Stereo_Earpiece_Prescrip_wApp.ino:67: /Stephen/tympan-repo/libraries/Tympan_Library/examples/05-FullSystems/WDRC_NBand_Stereo_Earpiece_Prescrip_wApp/BTNRH_PresetManager_UI.h: In member function 'virtual bool BTNRH_StereoPresetManager_UI::processCharacterTriple(char, char, char)': BTNRH_PresetManager_UI.h:554: warning: comparison of constant '0' with boolean expression is always false 554 | delay(10); if (flag_fail < 0) { setIncrementChannelsMessage("Failed"); } else { setIncrementChannelsMessage("Complete");} Running eg... BTNRH_WDRC: Preset_SD_Base: beginSD_wRetry: WARNING : cannot open SD. sd.begin(SD_CONFIG) = 0 : Trying again... BTNRH_WDRC: Preset_SD_Base: beginSD_wRetry: WARNING : cannot open SD. sd.begin(SD_CONFIG) = 0 : FAILED all attempts. Returning w..Deprecated
./08-Earpieces/Deprecated/WDRC_XBand_PrescripSave_wApp/WDRC_XBand_PrescripSave_wApp.ino Deprecated ./02-Utility/Bluetooth/Deprecated (RevD, RevE)/ChangeBaudrate/ChangeBaudrate.ino Deprecated ./02-Utility/Bluetooth/Deprecated (RevD, RevE)/BC127LibraryTest/BC127LibraryTest.ino Deprecated ./02-Utility/Bluetooth/Deprecated (RevD, RevE)/BasicGain_wApp_BLEdebug/BasicGain_wApp_BLEdebug.ino Deprecated ./02-Utility/Bluetooth/Deprecated (RevD, RevE)/BluetoothAudio_PassThru/BluetoothAudio_PassThru.ino Deprecated ./02-Utility/Bluetooth/Deprecated (RevD, RevE)/EchoBLE/EchoBLE.ino Deprecated ./02-Utility/Bluetooth/Deprecated (RevD, RevE)/BC127Terminal/BC127Terminal.ino Deprecated ./02-Utility/Bluetooth/Deprecated (RevD, RevE)/BLELibraryTest/BLELibraryTest.ino Deprecated ./05-FullSystems/Deprecated/WDRC_8BandFreqWarpFIR/WDRC_8BandFreqWarpFIR.ino Deprecated ./05-FullSystems/Deprecated/WDRC_3BandIIR_wAFC/WDRC_3BandIIR_wAFC.ino Deprecated ./05-FullSystems/Deprecated/WDRC_8BandIIR_wAFC/WDRC_8BandIIR_wAFC.ino Deprecated