Skip to content

Commit

Permalink
#42
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Jun 30, 2021
1 parent 55124c7 commit afcdcc7
Show file tree
Hide file tree
Showing 12 changed files with 139 additions and 211 deletions.
76 changes: 10 additions & 66 deletions modular-psu-firmware.eez-project
Original file line number Diff line number Diff line change
Expand Up @@ -32481,7 +32481,7 @@
},
{
"type": "Container",
"left": 171,
"left": 173,
"top": 2,
"width": 134,
"height": 33,
Expand Down Expand Up @@ -72737,14 +72737,14 @@
}
},
{
"name": "SENSe:CURRent[:DC]:NPLCycles",
"name": "SENSe:NPLCycles",
"helpLink": "",
"parameters": [
{
"name": "cycles",
"type": [
{
"type": "nr1"
"type": "nr3"
}
],
"isOptional": false
Expand All @@ -72769,30 +72769,7 @@
}
},
{
"name": "SENSe:CURRent[:DC]:NPLCycles?",
"helpLink": "",
"parameters": [
{
"name": "channel",
"type": [
{
"type": "discrete",
"enumeration": "Channel"
}
],
"isOptional": true
}
],
"response": {
"type": [
{
"type": "numeric"
}
]
}
},
{
"name": "SENSe:CURRent[:DC]:APERture?",
"name": "SENSe:NPLCycles?",
"helpLink": "",
"parameters": [
{
Expand All @@ -72809,53 +72786,20 @@
"response": {
"type": [
{
"type": "numeric"
}
]
}
},
{
"name": "SENSe:VOLTage[:DC]:NPLCycles",
"helpLink": "",
"parameters": [
{
"name": "cycles",
"type": [
{
"type": "nr1"
}
],
"isOptional": false
},
{
"name": "channel",
"type": [
{
"type": "discrete",
"enumeration": "Channel"
}
],
"isOptional": true
}
],
"response": {
"type": [
{
"type": "numeric"
"type": "nr3"
}
]
}
},
{
"name": "SENSe:VOLTage[:DC]:NPLCycles?",
"name": "SENSe:APERture",
"helpLink": "",
"parameters": [
{
"name": "channel",
"name": "aperture",
"type": [
{
"type": "discrete",
"enumeration": "Channel"
"type": "nr3"
}
],
"isOptional": true
Expand All @@ -72870,7 +72814,7 @@
}
},
{
"name": "SENSe:VOLTage[:DC]:APERture?",
"name": "SENSe:APERture?",
"helpLink": "",
"parameters": [
{
Expand All @@ -72887,7 +72831,7 @@
"response": {
"type": [
{
"type": "numeric"
"type": "nr3"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion src/eez/gui/document_simulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,7 @@ const uint8_t assets[626347] = {
0x03, 0x28, 0x00, 0x08, 0xA0, 0x00, 0x72, 0x48, 0x5D, 0x00, 0x00, 0x16, 0x00, 0xB5, 0x15, 0x00,
0x43, 0x00, 0xE0, 0x01, 0x76, 0x64, 0x05, 0x31, 0x04, 0x00, 0x75, 0x67, 0x05, 0x9F, 0x76, 0x00,
0xE0, 0x01, 0x78, 0x00, 0x01, 0x00, 0x54, 0x3C, 0x00, 0x00, 0x17, 0x5C, 0x14, 0x00, 0x04, 0x54,
0x01, 0x17, 0x68, 0x14, 0x00, 0x04, 0x54, 0x01, 0x15, 0x74, 0x14, 0x00, 0xB5, 0xAB, 0x00, 0x02,
0x01, 0x17, 0x68, 0x14, 0x00, 0x04, 0x54, 0x01, 0x15, 0x74, 0x14, 0x00, 0xB5, 0xAD, 0x00, 0x02,
0x00, 0x86, 0x00, 0x21, 0x00, 0xCC, 0x00, 0x80, 0x14, 0x00, 0x02, 0x3C, 0x00, 0x57, 0xEF, 0x00,
0x01, 0x00, 0x8C, 0x14, 0x00, 0x04, 0x3C, 0x00, 0x15, 0x98, 0x14, 0x00, 0x06, 0x28, 0x05, 0x15,
0xA4, 0x14, 0x00, 0x06, 0x28, 0x00, 0x71, 0xB0, 0x5D, 0x00, 0x00, 0x0F, 0x00, 0x9D, 0xB4, 0x00,
Expand Down
2 changes: 1 addition & 1 deletion src/eez/gui/document_stm32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ const uint8_t assets[387383] = {
0xD4, 0x59, 0x00, 0x00, 0x16, 0x00, 0xB5, 0x15, 0x00, 0x43, 0x00, 0xE0, 0x01, 0x76, 0x64, 0x05,
0x31, 0x04, 0x00, 0x75, 0x67, 0x05, 0x9F, 0x76, 0x00, 0xE0, 0x01, 0x78, 0x00, 0x01, 0x00, 0xE0,
0x3C, 0x00, 0x00, 0x17, 0xE8, 0x14, 0x00, 0x04, 0x54, 0x01, 0x17, 0xF4, 0x14, 0x00, 0x04, 0x54,
0x01, 0x24, 0x00, 0x5A, 0xB8, 0x01, 0xB5, 0xAB, 0x00, 0x02, 0x00, 0x86, 0x00, 0x21, 0x00, 0xCC,
0x01, 0x24, 0x00, 0x5A, 0xB8, 0x01, 0xB5, 0xAD, 0x00, 0x02, 0x00, 0x86, 0x00, 0x21, 0x00, 0xCC,
0x00, 0x0C, 0x14, 0x00, 0x02, 0x3C, 0x00, 0x57, 0xEF, 0x00, 0x01, 0x00, 0x18, 0x14, 0x00, 0x04,
0x3C, 0x00, 0x15, 0x24, 0x14, 0x00, 0x06, 0x28, 0x05, 0x15, 0x30, 0x14, 0x00, 0x06, 0x28, 0x00,
0x71, 0x3C, 0x5A, 0x00, 0x00, 0x0F, 0x00, 0x9D, 0xB4, 0x00, 0x04, 0xB4, 0x1A, 0x11, 0x48, 0x14,
Expand Down
10 changes: 5 additions & 5 deletions src/eez/index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,29 +460,29 @@ bool Module::setMeasureVoltageRange(int subchannelIndex, uint8_t range, int *err
return false;
}

bool Module::getMeasureCurrentNPLC(int subchannelIndex, float &nplc, int *err) {
bool Module::getMeasureNPLC(int subchannelIndex, float &nplc, int *err) {
if (err) {
*err = SCPI_ERROR_HARDWARE_MISSING;
}
return false;
}

bool Module::setMeasureCurrentNPLC(int subchannelIndex, float nplc, int *err) {
bool Module::setMeasureNPLC(int subchannelIndex, float nplc, int *err) {
if (err) {
*err = SCPI_ERROR_HARDWARE_MISSING;
}
return false;
}

bool Module::getMeasureVoltageNPLC(int subchannelIndex, float &nplc, int *err) {
bool Module::getMeasureAperture(int subchannelIndex, float &nplc, int *err) {
if (err) {
*err = SCPI_ERROR_HARDWARE_MISSING;
}
return false;
}

bool Module::setMeasureVoltageNPLC(int subchannelIndex, float nplc, int *err) {
if (err) {
bool Module::setMeasureAperture(int subchannelIndex, float nplc, int *err) {
if (err) {
*err = SCPI_ERROR_HARDWARE_MISSING;
}
return false;
Expand Down
9 changes: 4 additions & 5 deletions src/eez/index.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,10 @@ struct Module {
virtual bool getMeasureVoltageRange(int subchannelIndex, uint8_t &range, int *err);
virtual bool setMeasureVoltageRange(int subchannelIndex, uint8_t range, int *err);

virtual bool getMeasureCurrentNPLC(int subchannelIndex, float &nplc, int *err);
virtual bool setMeasureCurrentNPLC(int subchannelIndex, float nplc, int *err);

virtual bool getMeasureVoltageNPLC(int subchannelIndex, float &nplc, int *err);
virtual bool setMeasureVoltageNPLC(int subchannelIndex, float nplc, int *err);
virtual bool getMeasureNPLC(int subchannelIndex, float &nplc, int *err);
virtual bool setMeasureNPLC(int subchannelIndex, float nplc, int *err);
virtual bool getMeasureAperture(int subchannelIndex, float &aperture, int *err);
virtual bool setMeasureAperture(int subchannelIndex, float aperture, int *err);

virtual bool isRouteOpen(int subchannelIndex, bool &isRouteOpen, int *err);
virtual bool routeOpen(ChannelList channelList, int *err);
Expand Down
4 changes: 2 additions & 2 deletions src/eez/modules/dib-dcm224/dib-dcm224.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ struct DcmModule : public PsuModule {
return false;
}

enabled = channel->pwmFrequency;
frequency = channel->pwmFrequency;

return true;
}
Expand Down Expand Up @@ -758,7 +758,7 @@ struct DcmModule : public PsuModule {
return false;
}

enabled = channel->pwmDuty;
duty = channel->pwmDuty;

return true;
}
Expand Down
Loading

0 comments on commit afcdcc7

Please sign in to comment.