Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Jun 9, 2021
1 parent db418a2 commit 6902cb4
Show file tree
Hide file tree
Showing 22 changed files with 60,933 additions and 61,941 deletions.
9 changes: 9 additions & 0 deletions src/eez/gui/data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,15 @@ int getXScroll(const WidgetCursor &widgetCursor) {
return value.getType() == VALUE_TYPE_INT ? value.getInt() : 0;
}

void getSloatAndSubchannelIndex(Cursor cursor, int16_t id, int &slotIndex, int &subchannelIndex) {
Value value;
DATA_OPERATION_FUNCTION(id, DATA_OPERATION_GET_SLOT_AND_SUBCHANNEL_INDEX, cursor, value);
if (value.getType() == VALUE_TYPE_UINT32) {
slotIndex = value.getFirstInt16();
subchannelIndex = value.getSecondInt16();
}
}

} // namespace gui
} // namespace eez

Expand Down
5 changes: 4 additions & 1 deletion src/eez/gui/data.h
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,8 @@ enum DataOperationEnum {
DATA_OPERATION_YT_DATA_TOUCH_DRAG,
DATA_OPERATION_GET_CANVAS_DRAW_FUNCTION,
DATA_OPERATION_GET_TEXT_CURSOR_POSITION,
DATA_OPERATION_GET_X_SCROLL
DATA_OPERATION_GET_X_SCROLL,
DATA_OPERATION_GET_SLOT_AND_SUBCHANNEL_INDEX
};

int count(int16_t id);
Expand Down Expand Up @@ -484,5 +485,7 @@ void ytDataTouchDrag(Cursor cursor, int16_t id, TouchDrag *touchDrag);
int getTextCursorPosition(Cursor cursor, int16_t id);
int getXScroll(const WidgetCursor &widgetCursor);

void getSloatAndSubchannelIndex(Cursor cursor, int16_t id, int &slotIndex, int &subchannelIndex);

} // namespace gui
} // namespace eez
73,945 changes: 36,960 additions & 36,985 deletions src/eez/gui/document_simulator.cpp

Large diffs are not rendered by default.

344 changes: 177 additions & 167 deletions src/eez/gui/document_simulator.h

Large diffs are not rendered by default.

44,769 changes: 22,366 additions & 22,403 deletions src/eez/gui/document_stm32.cpp

Large diffs are not rendered by default.

318 changes: 164 additions & 154 deletions src/eez/gui/document_stm32.h

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion src/eez/index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ const char *Module::getPinoutFile() {
return nullptr;
}

bool Module::measureTemperature(int subbchannelIndex, float &temperature, int *err) {
bool Module::measureTemperature(int subchannelIndex, float &temperature, int *err) {
if (err) {
*err = SCPI_ERROR_HARDWARE_MISSING;
}
Expand All @@ -935,6 +935,14 @@ bool Module::isCopyToAvailable() {
void Module::copyTo(int slotIndex) {
}

bool Module::isMicroAmperAllowed(int subchannelIndex) {
return false;
}

bool Module::isAmperAllowed(int subchannelIndex) {
return false;
}

////////////////////////////////////////////////////////////////////////////////

struct NoneModule : public Module {
Expand Down
5 changes: 4 additions & 1 deletion src/eez/index.h
Original file line number Diff line number Diff line change
Expand Up @@ -441,10 +441,13 @@ struct Module {

virtual const char *getPinoutFile();

virtual bool measureTemperature(int subbchannelIndex, float &temperature, int *err);
virtual bool measureTemperature(int subchannelIndex, float &temperature, int *err);

virtual bool isCopyToAvailable();
virtual void copyTo(int slotIndex);

virtual bool isMicroAmperAllowed(int subchannelIndex);
virtual bool isAmperAllowed(int subchannelIndex);
};

static const int NUM_SLOTS = 3;
Expand Down
Loading

0 comments on commit 6902cb4

Please sign in to comment.