Merge branch 'stairstep'

This commit is contained in:
Ian Daniher committed 2015-03-04 00:46:12 -05:00
commit 2a78f316e8
7 files changed
+124 -4

No files matched your search

+1
View File
@@ -245,6 +245,7 @@ void SrcItem::update() {
else if (m_src == "callback") v = SRC_CALLBACK;
else if (m_src == "square") v = SRC_SQUARE;
else if (m_src == "sawtooth") v = SRC_SAWTOOTH;
else if (m_src == "stairstep") v = SRC_STAIRSTEP;
else if (m_src == "sine") v = SRC_SINE;
else if (m_src == "triangle") v = SRC_TRIANGLE;
else return;
Binary file not shown.

After

Width:  |  Height:  |  Size: 646 B

+115
View File
@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="40"
height="40"
id="svg3835"
version="1.1"
inkscape:version="0.48.5 r10040"
inkscape:export-filename="/home/it/projects/m1k/pixelpulse2/icons/saw.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
sodipodi:docname="sawtooth.svg">
<defs
id="defs3837" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="11.313709"
inkscape:cx="54.170346"
inkscape:cy="1.7737065"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
showguides="true"
inkscape:guide-bbox="true"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1918"
inkscape:window-height="1060"
inkscape:window-x="0"
inkscape:window-y="18"
inkscape:window-maximized="0">
<sodipodi:guide
orientation="0,1"
position="113.1371,2.6243442"
id="guide3858" />
</sodipodi:namedview>
<metadata
id="metadata3840">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-378.80719,-390.45972)">
<path
id="path3895"
d="m 385.47876,419.11308 8.49112,-0.0884"
style="fill:none;stroke:#8a8a8a;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
sodipodi:nodetypes="cc"
inkscape:export-filename="/home/km/projects/helium/pixelpulse2/icons/triangle.png"
inkscape:export-xdpi="134.88872"
inkscape:export-ydpi="134.88872"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
inkscape:export-ydpi="134.88872"
inkscape:export-xdpi="134.88872"
inkscape:export-filename="/home/km/projects/helium/pixelpulse2/icons/triangle.png"
sodipodi:nodetypes="cc"
style="fill:none;stroke:#8a8a8a;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
d="m 394.22921,409.8323 8.49112,-0.0884"
id="path3018" />
<path
id="path3020"
d="m 394.27631,410.13874 0.0884,8.49112"
style="fill:none;stroke:#8a8a8a;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
sodipodi:nodetypes="cc"
inkscape:export-filename="/home/km/projects/helium/pixelpulse2/icons/triangle.png"
inkscape:export-xdpi="134.88872"
inkscape:export-ydpi="134.88872"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
inkscape:export-ydpi="134.88872"
inkscape:export-xdpi="134.88872"
inkscape:export-filename="/home/km/projects/helium/pixelpulse2/icons/triangle.png"
sodipodi:nodetypes="cc"
style="fill:none;stroke:#8a8a8a;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
d="m 402.58482,400.94635 0.0884,8.49112"
id="path3022" />
<path
id="path3024"
d="m 402.80288,400.55152 8.49112,-0.0884"
style="fill:none;stroke:#8a8a8a;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
sodipodi:nodetypes="cc"
inkscape:export-filename="/home/km/projects/helium/pixelpulse2/icons/triangle.png"
inkscape:export-xdpi="134.88872"
inkscape:export-ydpi="134.88872"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

+1 -1
Submodule libsmu updated: 85a9ef51d4...0f763f6246.
+1
View File
@@ -23,6 +23,7 @@
<file>icons/square.png</file>
<file>icons/triangle.png</file>
<file>icons/sawtooth.png</file>
<file>icons/stairstep.png</file>
<file>icons/constant.png</file>
<file>icons/play.png</file>
<file>icons/pause.png</file>
+2 -2
View File
@@ -15,8 +15,8 @@ Item {
return offset * period - phase;
}
function periodDivisor() {
return ( (signal.src.src == 'square' || signal.src.src == 'sawtooth') ? 1: 2)
}
return ( (signal.src.src == 'square' || signal.src.src == 'sawtooth' || signal.src.src == 'stairstep') ? 1: 2)
}
property var dragging: null
property var relX: 0
+4 -1
View File
@@ -54,6 +54,9 @@ Rectangle {
MenuItem { text: "Sawtooth"
onTriggered: signalBlock.switchToPeriodic('sawtooth')
}
MenuItem { text: "Stairstep"
onTriggered: signalBlock.switchToPeriodic('stairstep')
}
MenuItem { text: "Square"
onTriggered: signalBlock.switchToPeriodic('square')
}
@@ -206,7 +209,7 @@ Rectangle {
OverlayPeriodic {
id: overlay_periodic
visible: (signal.src.src == 'sine' || signal.src.src == 'triangle' || signal.src.src == 'sawtooth' || signal.src.src == 'square') && (channel.mode == {'Voltage': 1, 'Current': 2}[signal.label])
visible: (signal.src.src == 'sine' || signal.src.src == 'triangle' || signal.src.src == 'sawtooth' || signal.src.src == 'stairstep' || signal.src.src == 'square') && (channel.mode == {'Voltage': 1, 'Current': 2}[signal.label])
}
OverlayConstant {