Skip to content

Commit c6ec579

Browse files
merge main
2 parents 9a905b2 + ad2a597 commit c6ec579

File tree

7 files changed

+240
-328
lines changed

7 files changed

+240
-328
lines changed

CHANGELOG.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ Changelog for Stingray Controller
88
Added:
99
^^^^^^
1010
- Handling for new firmware error reporting
11+
- Stim waiting state to add spinner to stim start/stop button
1112

1213

13-
0.3.0 (unreleased)
14+
0.3.0 (2023-07-11)
1415
------------------
1516

1617
Added:
@@ -26,8 +27,8 @@ Fixed:
2627
^^^^^^
2728
- Error message for when:
2829

29-
- The instrument's firmware is incompatible with the software
30-
- An error occurs during software install
30+
- The instrument's firmware is incompatible with the software
31+
- An error occurs during software install
3132

3233

3334
0.2.0 (2023-06-05)

controller/poetry.lock

Lines changed: 182 additions & 302 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controller/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ httpx = "0.24.1"
1515
aioserial = "1.3.1"
1616
Cython = "0.29.34"
1717
immutabledict = "2.2.3"
18+
jsonschema = "4.17.3" # Tanner (7/7/23): pinning this to avoid issues with pyinstaller. Can probably remove this dependency entirely once labware-domain-models is removed
1819
labware-domain-models = "0.3.1"
1920
numpy = "1.23.5" # pinned for pulse3d
2021
# psutil = "5.9.4"
21-
pulse3d = "0.33.5"
22+
pulse3d = "0.33.10"
2223
pyserial = "3.5"
2324
semver = "2.13.0"
2425
stdlib-utils = "0.5.2"
@@ -33,7 +34,7 @@ aioconsole = "0.6.0"
3334
freezegun = "1.2.2"
3435
# pefile = "2023.2.7" # Tanner (2/24/23): this must be explicitly specified so that it will be included in a Windows build environment
3536
pre-commit = "3.1.1"
36-
pyinstaller = "5.8.0"
37+
pyinstaller = "5.13.0"
3738
pytest = "7.2.1"
3839
pytest-asyncio = "0.20.3"
3940
pytest-cov = "4.0.0"
@@ -42,7 +43,6 @@ pytest-profiling = "1.7.0"
4243
pytest-randomly = "3.12.0"
4344
pytest-timeout = "2.1.0"
4445
# pywin32-ctypes = "0.2.0" # Tanner (2/24/23): this must be explicitly specified so that it will be included in a Windows build environment
45-
requests = "2.28.2"
4646

4747
[build-system]
4848
requires = ["poetry-core", "setuptools", "Cython", "numpy"]

ui/components/status/StatusBar.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,11 @@ export default {
260260
},
261261
stimStatus: function (newStatus) {
262262
// only let stim messages through if system is in idle ready state
263-
if (this.statusUuid === SYSTEM_STATUS.IDLE_READY) this.setStimSpecificStatus(newStatus);
263+
if (this.statusUuid === SYSTEM_STATUS.IDLE_READY) {
264+
if (newStatus === STIM_STATUS.WAITING) newStatus = this.stimPlayState ? "Stopping..." : "Starting...";
265+
266+
this.setStimSpecificStatus(newStatus);
267+
}
264268
},
265269
confirmationRequest: async function () {
266270
const stimOpsInProgress =

ui/components/stimulation/StimulationStudioControls.vue

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@
2525
</svg>
2626
<span :class="svg__StimulationStudioControlsPlayStopButton__dynamicClass" @click="handlePlayStop">
2727
<div
28-
v-if="!playState"
29-
id="start-stim-button"
30-
v-b-popover.hover.top="startStimLabel"
31-
title="Start Stimulation"
28+
v-b-popover.hover.bottom="playState ? stopStimLabel : startStimLabel"
29+
:title="playState ? 'Stop Stimulation' : 'Start Stimulation'"
3230
>
33-
<!-- this is here for testing the popover message -->
34-
<span id="start-popover-msg" style="display: none">{{ startStimLabel }}</span>
35-
<FontAwesomeIcon class="fontawesome-icon-class" :icon="['fa', 'play-circle']" />
36-
</div>
37-
<div v-if="playState" v-b-popover.hover.bottom="stopStimLabel" title="Stop Stimulation">
38-
<!-- this is here for testing the popover message -->
39-
<span id="stop-popover-msg" style="display: none">{{ stopStimLabel }}</span>
40-
<FontAwesomeIcon class="fontawesome-icon-class" :icon="['fa', 'stop-circle']" />
31+
<span :id="playState ? 'stop-popover-msg' : 'start-popover-msg'" style="display: none">{{
32+
playState ? stopStimLabel : startStimLabel
33+
}}</span>
34+
<FontAwesomeIcon
35+
class="fontawesome-icon-class"
36+
:icon="playState ? ['fa', 'stop-circle'] : ['fa', 'play-circle']"
37+
/>
38+
<span v-show="isStimInWaiting" class="span__start-stop-spinner">
39+
<FontAwesomeIcon :style="'fill: #ececed;'" :icon="['fa', 'spinner']" pulse />
40+
</span>
4141
</div>
4242
</span>
4343
</div>
@@ -96,7 +96,7 @@
9696
<line class="svg__inner-line" x1="34.8" y1="17.28" x2="21.16" y2="30.91" />
9797
<line class="svg__inner-line" x1="58.73" y1="30.87" x2="50.48" y2="30.87" />
9898
</svg>
99-
<span v-show="configCheckInProgress" class="span__spinner">
99+
<span v-show="configCheckInProgress" class="span__config-check-spinner">
100100
<FontAwesomeIcon :style="'fill: #ececed;'" :icon="['fa', 'spinner']" pulse />
101101
</span>
102102
</div>
@@ -274,7 +274,12 @@ export default {
274274
opacity: this.disabled ? 0.5 : 1,
275275
};
276276
},
277+
isStimInWaiting: function () {
278+
return this.stimStatus === STIM_STATUS.WAITING;
279+
},
277280
isStartStopButtonEnabled: function () {
281+
if (this.isStimInWaiting) return false;
282+
278283
if (!this.playState) {
279284
// if starting stim make sure initial magnetometer calibration has been completed and
280285
// no additional calibrations are running, stim checks have completed, there are no short or
@@ -396,6 +401,8 @@ export default {
396401
async handlePlayStop(e) {
397402
e.preventDefault();
398403
if (this.isStartStopButtonEnabled) {
404+
this.$store.commit("stimulation/setStimStatus", STIM_STATUS.WAITING);
405+
399406
if (this.playState) {
400407
this.$store.dispatch(`stimulation/stopStimulation`);
401408
clearTimeout(this.stim24hrTimer); // clear 24 hour timer for next stimulation
@@ -490,7 +497,7 @@ body {
490497
grid-template-columns: repeat(25%, 4);
491498
align-items: center;
492499
justify-items: center;
493-
padding: 5px;
500+
padding: 2px;
494501
}
495502
496503
.span__stimulation-controls-play-stop-button--disabled {
@@ -571,11 +578,11 @@ body {
571578
width: 20px;
572579
}
573580
574-
.span__spinner {
581+
.span__config-check-spinner {
575582
position: absolute;
576583
font-size: 34px;
577-
right: 17.5px;
578-
bottom: 15px;
584+
left: 5px;
585+
top: 0px;
579586
width: 45px;
580587
color: #fff;
581588
padding-left: 5px;
@@ -640,6 +647,17 @@ body {
640647
fill: none;
641648
}
642649
650+
.span__start-stop-spinner {
651+
position: absolute;
652+
font-size: 20px;
653+
right: 2px;
654+
bottom: 3px;
655+
color: #fff;
656+
padding-left: 5px;
657+
background-color: #000;
658+
opacity: 0.75;
659+
}
660+
643661
#user-input-prompt-message,
644662
#open-circuit-warning,
645663
#stim-24hr-warning,

ui/components/stimulation/StimulationStudioCreateAndEdit.vue

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,13 @@ export default {
8080
};
8181
},
8282
computed: {
83-
...mapState("stimulation", ["protocolList", "editMode"]),
83+
...mapState("stimulation", ["protocolList", "editMode", "selectedWells"]),
8484
editModeStatus: function () {
8585
return this.editMode.status;
8686
},
87+
noWellsSelected: function () {
88+
return this.selectedWells.length === 0;
89+
},
8790
},
8891
watch: {
8992
protocolList: function (newList, oldList) {
@@ -113,7 +116,11 @@ export default {
113116
this.$emit("handle-selection-change", selectedProtocol);
114117
},
115118
disableSelectionBtn(idx) {
116-
return this.disableEdits || (this.selectedProtocolIdx === 0 && idx === 0);
119+
return (
120+
this.disableEdits ||
121+
(this.selectedProtocolIdx === 0 && idx === 0) ||
122+
(this.noWellsSelected && idx === 0)
123+
);
117124
},
118125
handleClick(idx) {
119126
if (this.disableSelectionBtn(idx)) {

ui/store/modules/stimulation/enums.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ export const STIM_STATUS = {
99
READY: "Ready",
1010
// stim play states
1111
STIM_ACTIVE: "Stimulating...",
12+
// used to show spinner in stim controls over play/stop button
13+
WAITING: "",
1214

1315
// error
1416
SHORT_CIRCUIT_ERROR: "Short Circuit Error",

0 commit comments

Comments
 (0)