Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Jun 1, 2021
1 parent 0c4aecd commit 691be8d
Show file tree
Hide file tree
Showing 25 changed files with 62,505 additions and 61,505 deletions.
510 changes: 402 additions & 108 deletions modular-psu-firmware.eez-project

Large diffs are not rendered by default.

702 changes: 517 additions & 185 deletions src/eez/function_generator.cpp

Large diffs are not rendered by default.

16 changes: 10 additions & 6 deletions src/eez/function_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ namespace function_generator {
enum Waveform {
WAVEFORM_NONE,
WAVEFORM_DC,
WAVEFORM_SINE_WAVE,
WAVEFORM_SINE,
WAVEFORM_SINE_HALF,
WAVEFORM_SINE_RECTIFIED,
WAVEFORM_TRIANGLE,
WAVEFORM_SQUARE_WAVE,
WAVEFORM_SQUARE,
WAVEFORM_PULSE,
WAVEFORM_SAWTOOTH,
WAVEFORM_ARBITRARY
Expand All @@ -48,7 +50,7 @@ struct WaveformParameters {
float phaseShift;
float amplitude;
float offset;
float pulseWidth;
float dutyCycle;
};

WaveformParameters *getWaveformParameters(int slotIndex, int subchannelIndex, int resourceIndex);
Expand Down Expand Up @@ -85,12 +87,14 @@ bool setAmplitude(int slotIndex, int subchannelIndex, int resourceIndex, float a
bool getOffset(int slotIndex, int subchannelIndex, int resourceIndex, float &offset, int *err);
bool setOffset(int slotIndex, int subchannelIndex, int resourceIndex, float offset, int *err);

bool getPulseWidth(int slotIndex, int subchannelIndex, int resourceIndex, float &pulseWidth, int *err);
bool setPulseWidth(int slotIndex, int subchannelIndex, int resourceIndex, float pulseWidth, int *err);
bool getDutyCycle(int slotIndex, int subchannelIndex, int resourceIndex, float &dutyCycle, int *err);
bool setDutyCycle(int slotIndex, int subchannelIndex, int resourceIndex, float dutyCycle, int *err);

bool getResourceType(int slotIndex, int subchannelIndex, int resourceIndex, FunctionGeneratorResourceType &resourceType, int *err);
bool setResourceType(int slotIndex, int subchannelIndex, int resourceIndex, FunctionGeneratorResourceType resourceType, int *err);

void reset();

bool isActive();
void executionStart();
void tick();
Expand All @@ -99,7 +103,7 @@ void abort();
extern eez::gui::SetPage *g_pFunctionGeneratorPage;
extern eez::gui::SetPage *g_pFunctionGeneratorSelectChannelsPage;

extern const char *g_waveformShortLabel[8];
extern const char *g_waveformShortLabel[10];

} // namespace function_generator
} // namespace eez
73,966 changes: 37,032 additions & 36,934 deletions src/eez/gui/document_simulator.cpp

Large diffs are not rendered by default.

Loading

0 comments on commit 691be8d

Please sign in to comment.