Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
2
2001_0033_neuromorphic_user
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SHINDAESUB
2001_0033_neuromorphic_user
Commits
3c6f2a7c
Commit
3c6f2a7c
authored
3 years ago
by
SHINDAESUB
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
teaching info update
parent
9ed3eb2f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
app.js
backend/app.js
+7
-5
TeachingModal.vue
frontend/src/modal/TeachingModal.vue
+8
-1
No files found.
backend/app.js
View file @
3c6f2a7c
...
...
@@ -7,7 +7,7 @@ const dotenv = require('dotenv');
const
app
=
express
()
const
bodyParser
=
require
(
'body-parser'
);
//
let
infoMsg
=
''
dotenv
.
config
({
path
:
path
.
resolve
(
...
...
@@ -50,7 +50,7 @@ const jsonFile = fs.readFileSync('./json/projects.json', 'utf8');
const
jsonData
=
JSON
.
parse
(
jsonFile
);
console
.
log
(
jsonData
);
console
.
table
(
jsonData
);
//Post 방식은 Get 과 다르기 때문에 body-parser 를 설치해서 사용해야한다.
app
.
use
(
bodyParser
.
json
());
...
...
@@ -206,9 +206,10 @@ app.get('/api/requestManager',wrapper(async (req,res)=>{
req
.
query
.
image_path
=
process
.
env
.
TEACHING_IMAGE_PATH
if
(
req
.
query
.
cmd
===
"neuro_check"
)
req
.
query
.
teaching
=
`
${
process
.
env
.
TEACHING_IMAGE_PATH
}
-test-2-
${
process
.
env
.
TEACHING_RESOLUTION
}
-
${
req
.
query
.
teaching_info
}
`
if
(
req
.
query
.
cmd
===
"neuro_check"
){
req
.
query
.
teaching
=
`
${
process
.
env
.
TEACHING_IMAGE_PATH
}
-
${
req
.
query
.
project_num
}
-2-
${
process
.
env
.
TEACHING_RESOLUTION
}${
req
.
query
.
teaching_info
}
`
}
//req.query.project_num
console
.
log
(
"param :"
,
JSON
.
stringify
(
req
.
query
)
)
sendToManager
(
JSON
.
stringify
(
req
.
query
))
...
...
@@ -258,9 +259,10 @@ function responseManager (requestMsg) {
let
timer
=
setInterval
(()
=>
{
if
(
requestMsg
===
JSON
.
parse
(
udpResultMsg
).
cmd
){
console
.
log
(
`json 데이터는 ?
${
JSON
.
parse
(
udpResultMsg
).
cmd
}
`
)
if
(
requestMsg
===
'capture_done'
)
infoMsg
=
JSON
.
parse
(
udpResultMsg
).
msg
resolve
(
udpResultMsg
)
clearInterval
(
timer
)
}
else
if
(
waitingTime
===
5000
){
}
else
if
(
waitingTime
===
5000
00
){
reject
(
'No response from Manager'
)
clearInterval
(
timer
)
}
else
{
...
...
This diff is collapsed.
Click to expand it.
frontend/src/modal/TeachingModal.vue
View file @
3c6f2a7c
...
...
@@ -178,10 +178,17 @@ export default {
},
async
neuroCheck
(){
let
teachingInfo
=
''
this
.
info
.
info
.
forEach
((
rect
)
=>
{
let
str
=
`(
${
Math
.
ceil
(
rect
.
startX
*
1.5
)}
,
${
Math
.
ceil
(
rect
.
startY
*
1.5
)}
,
${
Math
.
ceil
(
rect
.
lastX
*
1.5
)}
,
${
Math
.
ceil
(
rect
.
lastY
*
1.5
)
}
)`
teachingInfo
=
teachingInfo
+
"-"
+
str
})
let
msg
=
new
Object
()
msg
.
cmd
=
"neuro_check"
msg
.
project_num
=
this
.
info
.
uid
msg
.
teaching_info
=
'(1113,720,1329,840)-(1626,504,1788,651)-(1953,816,2049,978)'
msg
.
teaching_info
=
teachingInfo
await
teachingService
.
requestManager
(
msg
)
.
then
(
data
=>
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
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