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.
FuncGenFSST.h
00001 00002 #ifndef FuncGenFSST_h 00003 #define FuncGenFSST_h 00004 00005 // Amplituden fix auf +/-1 00006 00007 class SignedRampGen { 00008 public: 00009 float val; // momentaner Ausgangswert 00010 private: 00011 float _inc; 00012 public: 00013 SignedRampGen(); // Konstruktor 00014 00015 void SetPointsPerPeriod(float aPoints); 00016 00017 // bezogen auf Fsample 0..0.5 00018 void SetFrequ(float aFrequ); 00019 00020 // Einen Abtastwert berechnen 00021 // wird bei z.B. Fsample=100Hz 100x pro sec afgerufen 00022 void CalcOneStep(); 00023 }; 00024 00025 00026 class TriangleGen { 00027 public: 00028 float val; // momentaner Ausgangswert 00029 private: 00030 float _inc; 00031 int _state; 00032 public: 00033 TriangleGen(); 00034 00035 void SetPointsPerPeriod(int aPoints); 00036 00037 // bezogen auf Fsample 0..0.5 00038 void SetFrequ(float aFrequ); 00039 00040 // Einen Abtastwert berechnen 00041 void CalcOneStep(); 00042 }; 00043 00044 00045 class RectGen { 00046 public: 00047 float val_orginal; // momentaner Ausgangswert 00048 float val; 00049 private: 00050 float _inc; 00051 float _phase; 00052 public: 00053 RectGen(); 00054 00055 void SetPointsPerPeriod(int aPoints); 00056 00057 void SetFrequ(float aFrequ); 00058 00059 // Dauer des ON-Pulses in Prozent ( 0..1 ) 00060 void SetPulsWidth(float aPercent); 00061 00062 // Einen Abtastwert berechnen 00063 void CalcOneStep(); 00064 }; 00065 00066 #endif 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086
Generated on Thu Jul 21 2022 09:23:03 by
1.7.2