Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Leander Schulten
Lichtsteuerung
Commits
d5773bac
Commit
d5773bac
authored
Feb 22, 2018
by
Leander Schulten
Browse files
Small Bug fixes
parent
151c3a2b
Changes
4
Hide whitespace changes
Inline
Side-by-side
HardwareInterface.h
View file @
d5773bac
...
...
@@ -44,6 +44,7 @@ class AbstractHardwareInterface : public HardwareInterface{
std
::
chrono
::
milliseconds
sleepTime
;
private:
void
loop
(){
std
::
this_thread
::
yield
();
while
(
!
stopThread
.
load
()
&&
isFunctioning
())
{
auto
lock
=
std
::
unique_lock
<
std
::
mutex
>
(
mutex
);
while
(
run
.
load
()
&&
isFunctioning
())
{
...
...
ProgrammControl.qml
View file @
d5773bac
...
...
@@ -8,12 +8,12 @@ ControlItem{
id
:
item
blockWidth
:
3
blockHeight
:
1
pressed
:
controlData
.
programm
.
running
pressed
:
controlData
?
!
controlData
.
programm
.
running
:
false
onPressedChanged
:
{
if
(
controlData
.
programm
.
running
){
play
.
opacity
=
0
;
}
else
{
play
.
opacity
=
1
;
}
else
{
play
.
opacity
=
0
;
}
}
ControlItemBlock
{
...
...
@@ -49,7 +49,7 @@ ControlItem{
anchors.fill
:
parent
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
text
:
controlData
.
programm
.
name
text
:
controlData
?
controlData
.
programm
.
name
:
"
null
"
}
}
...
...
@@ -63,7 +63,7 @@ ControlItem{
id
:
speedSlider
from
:
0.1
to
:
10
value
:
controlData
.
programm
.
speed
value
:
controlData
?
controlData
.
programm
.
speed
:
1
onValueChanged
:
if
(
controlData
)
controlData
.
programm
.
speed
=
value
;
Text
{
id
:
sliderSpeed
...
...
programm.h
View file @
d5773bac
...
...
@@ -86,7 +86,7 @@ class TimeDistortion : public QObject{
private:
bool
enabled
=
false
;
QEasingCurve
distortionCurve
;
double
intervall
=
0
;
double
intervall
=
1
0
;
public:
TimeDistortion
()
=
default
;
TimeDistortion
(
const
QJsonObject
&
o
);
...
...
@@ -103,10 +103,14 @@ public:
double
getIntervall
()
const
{
return
intervall
;}
public:
double
distort
(
double
time
){
if
(
intervall
>
0
,
05
)
{
// sonst division durch 0
double
diff
=
std
::
fmod
(
time
,
intervall
);
// wie weit sind wir in aktuellen intervall
double
offset
=
time
-
diff
;
// offset zum intervall start
diff
=
distortionCurve
.
valueForProgress
(
diff
/
intervall
)
*
intervall
;
// die verzerrung für den Aktuellen fortchritt im intervall mal die intervall größe
return
offset
+
diff
;
// den offset plus der verzerrte Fortschritt im intervall
}
else
{
return
time
;
}
}
signals:
void
enabledChanged
(
bool
);
...
...
programmprototype.h
View file @
d5773bac
...
...
@@ -33,7 +33,7 @@ class ChannelProgramm : public QObject{
Q_PROPERTY
(
RepeatPolicy
repeatPolicy
MEMBER
repeatPolicy
NOTIFY
repeatPolicyChanged
)
Q_PROPERTY
(
Channel
*
channel
READ
getChannel
CONSTANT
)
private:
RepeatPolicy
repeatPolicy
;
RepeatPolicy
repeatPolicy
=
Continue
;
public:
ChannelProgramm
(
const
QJsonObject
&
o
);
ChannelProgramm
(
const
Channel
*
channel
)
:
channel
(
channel
){
setParent
(
getChannel
());}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment