Commit 5d78d536 authored by 957dd's avatar 957dd

x

parent f15881ac
This source diff could not be displayed because it is too large. You can view the blob instead.
No preview for this file type
......@@ -3,6 +3,7 @@
#include "mqtt.h"
#include "serial.h"
#include "delay.h"
#include "opensh.h"
void *serial_usart1(void *arg)
......@@ -27,7 +28,7 @@ void *AppExit(void *arg)
unsigned char bufpwm4[3]={gtypeTemp,4,0};
Delay_Ms(0,100);
gPwmCount++;
printf( "%d\n",gtypeTemp);
//printf( "%d\n",gtypeTemp);
if(gPwmCount>20)
{
//printf( "%d\n",gtypeTemp);
......@@ -69,6 +70,8 @@ int main(int argc, char *argv[]) {
gStart=time(NULL);//开始时间戳
opencamsh();
serial_Init();//串口初始化
mqtt_init();//mqtt初始化
......
......@@ -12,8 +12,8 @@
#define BROKER_ADDRESS "119.45.167.177"
#define BROKER_PORT 1883
#define CLIENT_ID "device1car/carer5434"
#define TOPIC "controcar0005"
#define CLIENT_ID "feichirensheng/control/car0001"
#define TOPIC "controlcar0001"
#define USERNAME "admin" // 替换为你的用户名
#define PASSWORD "admin" // 替换为你的密码
......
#include <stdio.h>
#include <stdlib.h>
#include "opensh.h"
int opencamsh()
{
int camsh=system(SHELLFILE);
if(camsh==-1)
{
return -1;
}
printf("open cam\n");
return 0;
}
#ifndef __opensh_H__
#define __opensh_H__
#define SHELLFILE "/home/kickpi/camshell/cam.sh"
int opencamsh();
#endif
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment