Skip to content

Commit

Permalink
fix: prevent floating point loop on fader level by setting step to 0.01
Browse files Browse the repository at this point in the history
chore: better verbose logging
  • Loading branch information
olzzon authored and olzzon committed Feb 14, 2020
1 parent 4e8233c commit 263d016
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions client/components/Channel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ class Channel extends React.Component<IChannelProps & IChannelInjectProps & Stor
animate={false}
range={{ min: 0, max: 1 }}
start={[this.props.fader.faderLevel]}
step={0.01}
connect
onSlide={(event: any) => {
this.handleLevel(event);
Expand Down
1 change: 1 addition & 0 deletions server/MainThreadHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ export class MainThreadHandlers {
)
.on(SOCKET_SET_FADERLEVEL, (
(payload: any) => {
logger.verbose('Set faderlevel Channel : ' + String(payload.faderIndex + 1) + ' Level : ' + String(payload.level))
store.dispatch({
type: SET_FADER_LEVEL,
channel: payload.faderIndex,
Expand Down
2 changes: 1 addition & 1 deletion server/utils/mixerConnections/OscMixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ export class OscMixerConnection {
pingMixerCommand() {
//Ping OSC mixer if mixerProtocol needs it.
this.mixerProtocol.pingCommand.map((command) => {
logger.verbose('Sending OSC command :' + command.mixerMessage, {})
this.sendOutMessage(
command.mixerMessage,
0,
Expand Down Expand Up @@ -366,6 +365,7 @@ export class OscMixerConnection {
channelString
);
if (message != 'none') {
logger.verbose('Sending OSC command :' + message, {})
this.oscConnection.send({
address: message,
args: [
Expand Down

0 comments on commit 263d016

Please sign in to comment.