Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
raspberry_Holographic
Project
Project
Details
Activity
Releases
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张泽仁
raspberry_Holographic
Commits
c4f0e457
Commit
c4f0e457
authored
Oct 25, 2023
by
张泽仁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
release version for attempt
parent
c2eb9d23
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
11 deletions
+38
-11
interface.c
raspberrypi_spi/LocalDimming/interface.c
+38
-11
No files found.
raspberrypi_spi/LocalDimming/interface.c
View file @
c4f0e457
...
...
@@ -57,7 +57,7 @@ int xfm_Init()
}
printf
(
"/dev/ttyUSB0 Open success
\r\n
"
);
if
((
fileuart
=
serialOpen
(
"/dev/ttyAMA0"
,
115200
))
<
0
)
if
((
fileuart
=
serialOpen
(
"/dev/ttyAMA0"
,
9600
))
<
0
)
//changed from 115200 to 9600
{
printf
(
"/dev/ttyAMA0 Open Faild
\r\n
"
);
return
0
;
...
...
@@ -71,7 +71,7 @@ int xfm_Init()
void
protocalAck
(
int
fileusb
)
{
printf
(
"protocalAck..
\n
"
);
printf
(
"protocalAck..
\n
"
);
char
retExmaple
[
12
]
=
{
0
};
strcpy
(
retExmaple
,
ret
);
retExmaple
[
3
]
=
0x04
;
...
...
@@ -142,6 +142,39 @@ uint16_t CrcValueCalc(const uint8_t *cpucData, uint16_t usLength)
extern
int
get_audio_device_id
();
void
releaseAckeachwakenwords
(
char
*
totalbuf
)
{
char
*
p
=
totalbuf
;
while
(
*
p
!=
'k'
||
*
(
p
+
1
)
!=
'e'
)
{
p
++
;
}
p
+=
12
;
if
(
g_callback
!=
NULL
){
char
buf
[
256
]
=
{
0
};
snprintf
(
buf
,
256
,
"cvlc --play-and-exit --aout alsa --alsa-audio-device hw:%d,0 /usr/local/bin/Videos/aaaa.mp3 &"
,
get_audio_device_id
());
//system("mpg321 /usr/local/bin/Videos/aaaa.mp3 &");
//system("cvlc --play-and-exit --aout alsa --alsa-audio-device hw:2,0 /usr/local/bin/Videos/aaaa.mp3 &");
system
(
buf
);
g_callback
(
g_callback_ctx
,
2
);
}
switch
(
*
p
)
{
case
'x'
:
g_callback
(
g_callback_ctx
,
2
);
break
;
case
'z'
:
g_callback
(
g_callback_ctx
,
4
);
break
;
case
'y'
:
g_callback
(
g_callback_ctx
,
3
);
break
;
default:
break
;
}
}
void
sentUart
(
char
*
buf
,
int
fileuart
)
{
if
(
count
==
9
)
...
...
@@ -156,15 +189,8 @@ void sentUart(char *buf, int fileuart)
write
(
fileuart
,
angleret
,
2
);
count
=
1
;
memset
(
totalbuf
,
0
,
1024
);
if
(
g_callback
!=
NULL
){
char
buf
[
256
]
=
{
0
};
snprintf
(
buf
,
256
,
"cvlc --play-and-exit --aout alsa --alsa-audio-device hw:%d,0 /usr/local/bin/Videos/aaaa.mp3 &"
,
get_audio_device_id
());
//system("mpg321 /usr/local/bin/Videos/aaaa.mp3 &");
//system("cvlc --play-and-exit --aout alsa --alsa-audio-device hw:2,0 /usr/local/bin/Videos/aaaa.mp3 &");
system
(
buf
);
g_callback
(
g_callback_ctx
,
2
);
}
releaseAckeachwakenwords
(
totalbuf
);
}
else
{
...
...
@@ -198,6 +224,7 @@ void circleReading()
else
{
sentUart
(
buf
,
fileuart
);
printf
(
" %d
\n
"
,
__LINE__
);
serialFlush
(
fileusb
);
}
}
}
...
...
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