Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
FuncGenFSST2.h@0:7d4329a1ccd9, 2017-05-04 (annotated)
- Committer:
- Polteko123
- Date:
- Thu May 04 08:19:15 2017 +0000
- Revision:
- 0:7d4329a1ccd9
TP;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Polteko123 | 0:7d4329a1ccd9 | 1 | |
| Polteko123 | 0:7d4329a1ccd9 | 2 | #ifndef FuncGenFSST_h |
| Polteko123 | 0:7d4329a1ccd9 | 3 | #define FuncGenFSST_h |
| Polteko123 | 0:7d4329a1ccd9 | 4 | |
| Polteko123 | 0:7d4329a1ccd9 | 5 | // Amplituden fix auf +/-1 |
| Polteko123 | 0:7d4329a1ccd9 | 6 | |
| Polteko123 | 0:7d4329a1ccd9 | 7 | class SignedRampGen { |
| Polteko123 | 0:7d4329a1ccd9 | 8 | public: |
| Polteko123 | 0:7d4329a1ccd9 | 9 | float val; // momentaner Ausgangswert |
| Polteko123 | 0:7d4329a1ccd9 | 10 | private: |
| Polteko123 | 0:7d4329a1ccd9 | 11 | float _inc; |
| Polteko123 | 0:7d4329a1ccd9 | 12 | public: |
| Polteko123 | 0:7d4329a1ccd9 | 13 | SignedRampGen(); // Konstruktor |
| Polteko123 | 0:7d4329a1ccd9 | 14 | |
| Polteko123 | 0:7d4329a1ccd9 | 15 | void SetPointsPerPeriod(float aPoints); |
| Polteko123 | 0:7d4329a1ccd9 | 16 | |
| Polteko123 | 0:7d4329a1ccd9 | 17 | // bezogen auf Fsample 0..0.5 |
| Polteko123 | 0:7d4329a1ccd9 | 18 | void SetFrequ(float aFrequ); |
| Polteko123 | 0:7d4329a1ccd9 | 19 | |
| Polteko123 | 0:7d4329a1ccd9 | 20 | // Einen Abtastwert berechnen |
| Polteko123 | 0:7d4329a1ccd9 | 21 | // wird bei z.B. Fsample=100Hz 100x pro sec afgerufen |
| Polteko123 | 0:7d4329a1ccd9 | 22 | void CalcOneStep(); |
| Polteko123 | 0:7d4329a1ccd9 | 23 | }; |
| Polteko123 | 0:7d4329a1ccd9 | 24 | |
| Polteko123 | 0:7d4329a1ccd9 | 25 | |
| Polteko123 | 0:7d4329a1ccd9 | 26 | class TriangleGen { |
| Polteko123 | 0:7d4329a1ccd9 | 27 | public: |
| Polteko123 | 0:7d4329a1ccd9 | 28 | float val; // momentaner Ausgangswert |
| Polteko123 | 0:7d4329a1ccd9 | 29 | private: |
| Polteko123 | 0:7d4329a1ccd9 | 30 | float _inc; |
| Polteko123 | 0:7d4329a1ccd9 | 31 | int _state; |
| Polteko123 | 0:7d4329a1ccd9 | 32 | float _phase; |
| Polteko123 | 0:7d4329a1ccd9 | 33 | public: |
| Polteko123 | 0:7d4329a1ccd9 | 34 | TriangleGen(); |
| Polteko123 | 0:7d4329a1ccd9 | 35 | |
| Polteko123 | 0:7d4329a1ccd9 | 36 | void SetPointsPerPeriod(float aPoints); |
| Polteko123 | 0:7d4329a1ccd9 | 37 | |
| Polteko123 | 0:7d4329a1ccd9 | 38 | // bezogen auf Fsample 0..0.5 |
| Polteko123 | 0:7d4329a1ccd9 | 39 | void SetFrequ(float aFrequ); |
| Polteko123 | 0:7d4329a1ccd9 | 40 | |
| Polteko123 | 0:7d4329a1ccd9 | 41 | // Einen Abtastwert berechnen |
| Polteko123 | 0:7d4329a1ccd9 | 42 | void CalcOneStep(); |
| Polteko123 | 0:7d4329a1ccd9 | 43 | }; |
| Polteko123 | 0:7d4329a1ccd9 | 44 | |
| Polteko123 | 0:7d4329a1ccd9 | 45 | |
| Polteko123 | 0:7d4329a1ccd9 | 46 | class RectGen { |
| Polteko123 | 0:7d4329a1ccd9 | 47 | public: |
| Polteko123 | 0:7d4329a1ccd9 | 48 | float val; // momentaner Ausgangswert |
| Polteko123 | 0:7d4329a1ccd9 | 49 | private: |
| Polteko123 | 0:7d4329a1ccd9 | 50 | float _inc; |
| Polteko123 | 0:7d4329a1ccd9 | 51 | float _phase; |
| Polteko123 | 0:7d4329a1ccd9 | 52 | float _thrs; // Threshold für die PulsWidth |
| Polteko123 | 0:7d4329a1ccd9 | 53 | public: |
| Polteko123 | 0:7d4329a1ccd9 | 54 | RectGen(); |
| Polteko123 | 0:7d4329a1ccd9 | 55 | |
| Polteko123 | 0:7d4329a1ccd9 | 56 | void SetPointsPerPeriod(float aPoints); |
| Polteko123 | 0:7d4329a1ccd9 | 57 | |
| Polteko123 | 0:7d4329a1ccd9 | 58 | void SetFrequ(float aFrequ); |
| Polteko123 | 0:7d4329a1ccd9 | 59 | |
| Polteko123 | 0:7d4329a1ccd9 | 60 | // Dauer des ON-Pulses in Prozent ( 0..1 ) |
| Polteko123 | 0:7d4329a1ccd9 | 61 | void SetPulsWidth(float aPercent); |
| Polteko123 | 0:7d4329a1ccd9 | 62 | |
| Polteko123 | 0:7d4329a1ccd9 | 63 | // Einen Abtastwert berechnen |
| Polteko123 | 0:7d4329a1ccd9 | 64 | void CalcOneStep(); |
| Polteko123 | 0:7d4329a1ccd9 | 65 | }; |
| Polteko123 | 0:7d4329a1ccd9 | 66 | |
| Polteko123 | 0:7d4329a1ccd9 | 67 | #endif |
| Polteko123 | 0:7d4329a1ccd9 | 68 | |
| Polteko123 | 0:7d4329a1ccd9 | 69 | |
| Polteko123 | 0:7d4329a1ccd9 | 70 | |
| Polteko123 | 0:7d4329a1ccd9 | 71 | |
| Polteko123 | 0:7d4329a1ccd9 | 72 | |
| Polteko123 | 0:7d4329a1ccd9 | 73 | |
| Polteko123 | 0:7d4329a1ccd9 | 74 | |
| Polteko123 | 0:7d4329a1ccd9 | 75 | |
| Polteko123 | 0:7d4329a1ccd9 | 76 | |
| Polteko123 | 0:7d4329a1ccd9 | 77 | |
| Polteko123 | 0:7d4329a1ccd9 | 78 | |
| Polteko123 | 0:7d4329a1ccd9 | 79 | |
| Polteko123 | 0:7d4329a1ccd9 | 80 | |
| Polteko123 | 0:7d4329a1ccd9 | 81 | |
| Polteko123 | 0:7d4329a1ccd9 | 82 | |
| Polteko123 | 0:7d4329a1ccd9 | 83 | |
| Polteko123 | 0:7d4329a1ccd9 | 84 | |
| Polteko123 | 0:7d4329a1ccd9 | 85 | |
| Polteko123 | 0:7d4329a1ccd9 | 86 |