Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2021-1-capstone-design1
/
RIT_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
박권수
2021-05-30 15:18:32 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ecb8217cc457d0659fc63aabd2ebf9c742f3396c
ecb8217c
1 parent
fb08de4a
style. code change
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
server/src/lib/DataProcess.js
server/src/lib/MqttModule.js
server/src/lib/DataProcess.js
View file @
ecb8217
...
...
@@ -40,7 +40,7 @@ const factoring = async (topic, message) => {
}
const
balanceFactoring
=
(
balance
)
=>
{
const
max
=
1
1
;
const
max
=
1
0
;
//Digital Lead Sensor Maximum Value
const
slicingBalance
=
max
/
5
;
if
(
parseInt
(
balance
)
<
slicingBalance
||
parseInt
(
balance
)
>
max
*
2
)
...
...
server/src/lib/MqttModule.js
View file @
ecb8217
...
...
@@ -13,7 +13,7 @@ exports.mqttOn = async (hosting, func) => {
clientList
.
push
(
client
);
client
.
on
(
'connect'
,
()
=>
{
console
.
log
(
'Client connected: '
,
client
.
connected
);
console
.
log
(
`Hub connected: `
,
client
.
connected
);
});
client
.
on
(
'message'
,
async
(
topic
,
message
,
packet
)
=>
{
...
...
Please
register
or
login
to post a comment