Add an optional pop-up notification when auto-turn is toggled (#496)

* Implement (most of) pop-up notification when autoturn is enabled

* Add neato fading: doesn't appear to impact performance

* formatting

* added macro and UI for notification of auto-turn

* changed notification default to true for auto-turn

* added common issue for trackers

* added warning for custom keys

* minor documentation markdown format fixes

* fix qml syntax error in atgb

* gasd

Co-authored-by: ykeara <ykeara1@gmail.com>
This commit is contained in:
Chelsea Jaggi
2020-08-11 20:03:35 -05:00
committed by GitHub
co-authored by ykeara
parent 90d980dcab
commit 6d1953070a
13 changed files with 324 additions and 32 deletions
@@ -35,10 +35,18 @@ GroupBox {
MyToggleButton {
id: autoTurn
text: "Toggle On/Off"
Layout.preferredWidth: 300
Layout.preferredWidth: 250
onCheckedChanged: {
RotationTabController.setAutoTurnEnabled(this.checked, true); }
}
MyToggleButton {
id: autoTurnNotificationToggle
text: "HMD Icon"
Layout.preferredWidth: 175
onCheckedChanged: {
RotationTabController.setAutoTurnShowNotification(this.checked, true)
}
}
MyText {
text: "Activation Dist:"
@@ -160,7 +168,7 @@ GroupBox {
}
MyText {
text: "Turn Speed (deg/sec):"
text: "Turn Speed(deg/sec):"
horizontalAlignment: Text.AlignRight
Layout.rightMargin: 10
}
@@ -174,7 +182,7 @@ GroupBox {
Layout.fillWidth: true
onPositionChanged: {
var val = this.value
speedValueText.text = val.toFixed()
speedValueText.text = val.toFixed()+ "°"
}
onValueChanged: {
@@ -184,7 +192,7 @@ GroupBox {
MyTextField {
id: speedValueText
text: "90"
text: "90°"
keyBoardUID: 1003
Layout.preferredWidth: 100
Layout.leftMargin: 10
@@ -203,29 +211,30 @@ GroupBox {
speedSlider.value = val;
}
//converts the centidegrees to degrees
text = (((RotationTabController.autoTurnSpeed)/100).toFixed());
text = (((RotationTabController.autoTurnSpeed)/100).toFixed()) + "°";
}
}
}
RowLayout{
MyText{
text: "Detangle Angle: "
horizontalAlignment: Text.AlignLeft
Layout.preferredWidth: 250
Layout.preferredWidth: 200
Layout.rightMargin: 5
}
MyText{
text:"Min Rotations(deg):"
text:"Min Rotations:"
Layout.rightMargin: 5
}
MyTextField {
id: detangleAngleStartText
text: "360"
text: "360°"
keyBoardUID: 1005
Layout.preferredWidth: 100
Layout.leftMargin: 5
@@ -239,6 +248,7 @@ GroupBox {
val = 3600
}
RotationTabController.setMinCordTangle((val*(Math.PI/180)), true);
text = (Math.round(val).toFixed())+ "°";
}
}
}
@@ -247,7 +257,7 @@ GroupBox {
}
MyText{
text: "Max Wall Angle(deg): "
text: "Max Wall Angle: "
horizontalAlignment: Text.AlignRight
Layout.rightMargin: 10
Layout.fillWidth: true
@@ -255,7 +265,7 @@ GroupBox {
}
MyTextField {
id: detangleAngleAssistText
text: "10"
text: "10°"
keyBoardUID: 1006
Layout.preferredWidth: 100
Layout.leftMargin: 10
@@ -269,6 +279,7 @@ GroupBox {
val = 3600
}
RotationTabController.setCordDetangleAngle((val*(Math.PI/180)), true);
text = (Math.round(val).toFixed())+ "°";
}
}
}
@@ -285,6 +296,7 @@ GroupBox {
deactivationSlider.value = RotationTabController.autoTurnDeactivationDistance.toFixed(2)
cornerAngle.checked = RotationTabController.autoTurnUseCornerAngle
speedSlider.value = (RotationTabController.autoTurnSpeed/100).toFixed()
autoTurnNotificationToggle.checked = RotationTabController.autoTurnShowNotification
if(RotationTabController.autoTurnMode === 1){
autoTurnModeToggle.checked = true;
@@ -293,8 +305,8 @@ GroupBox {
autoTurnModeToggle.checked = false;
}
detangleAngleStartText.text = parseInt(RotationTabController.minCordTangle*(180/Math.PI))
detangleAngleAssistText.text = parseInt(RotationTabController.cordDetangleAngle*(180/Math.PI))
detangleAngleStartText.text = parseInt(RotationTabController.minCordTangle*(180/Math.PI))+ "°"
detangleAngleAssistText.text = parseInt(RotationTabController.cordDetangleAngle*(180/Math.PI))+ "°"
}
Connections {
@@ -327,10 +339,13 @@ GroupBox {
}
}
onMinCordTangleChanged:{
detangleAngleStartText.text = parseInt(RotationTabController.minCordTangle*(180/Math.PI))
detangleAngleStartText.text = parseInt(RotationTabController.minCordTangle*(180/Math.PI))+ "°"
}
onCordDetangleAngleChanged:{
detangleAngleAssistText.text = parseInt(RotationTabController.cordDetangleAngle*(180/Math.PI))
detangleAngleAssistText.text = parseInt(RotationTabController.cordDetangleAngle*(180/Math.PI))+ "°"
}
onAutoTurnShowNotificationChanged:{
autoTurnNotificationToggle.checked = RotationTabController.autoTurnShowNotification
}
}
}