zhangbo 5 роки тому
батько
коміт
0588a7fc5f

BIN
app/bmc/bmc_app


+ 15 - 13
app/bmc/main.c

@@ -96,19 +96,21 @@ void main(void)
     {
         printf("%s: Create LANIfcTask thread failed!\n", __FUNCTION__);
     }
-	// /* Create IPMB interface */
-	// uint8_t primaryIpmbSelect = 0;	//primary
-	// gThreadIndex++;
-	// if(0 != pthread_create(&gThreadIDs[gThreadIndex],NULL,IPMBIfcTask,&primaryIpmbSelect))
- //   {
- //       printf("%s: Create LANIfcTask thread failed!\n", __FUNCTION__);
- //   }
- //   uint8_t secondaryIpmbSelect = 1;	//secondary
- //   gThreadIndex++;
-	// if(0 != pthread_create(&gThreadIDs[gThreadIndex],NULL,IPMBIfcTask,&secondaryIpmbSelect))
- //   {
- //       printf("%s: Create LANIfcTask thread failed!\n", __FUNCTION__);
- //   }
+
+//	/* Create IPMB interface */
+//	uint8_t primaryIpmbSelect = 0;	//primary
+//	gThreadIndex++;
+//	if(0 != pthread_create(&gThreadIDs[gThreadIndex],NULL,IPMBIfcTask,&primaryIpmbSelect))
+ //  {
+ //      printf("%s: Create LANIfcTask thread failed!\n", __FUNCTION__);
+ //  }
+ //  uint8_t secondaryIpmbSelect = 1;	//secondary
+ //  gThreadIndex++;
+ //       if(0 != pthread_create(&gThreadIDs[gThreadIndex],NULL,IPMBIfcTask,&secondaryIpmbSelect))
+ //  {
+ //      printf("%s: Create LANIfcTask thread failed!\n", __FUNCTION__);
+ //  }
+
 
 	/* Create Update FPGA thread */
 

+ 0 - 2
app/goahead-3.6.5/src/file.c

@@ -186,7 +186,6 @@ static void fileClose()
 
 PUBLIC void websFileOpen()
 {
-    printf(">>>>>>>>>>>>>>>>>>>>>>>>>>333>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
     websIndex = sclone("index.html");
     websDefineHandler("file", 0, fileHandler, fileClose, 0);
 }
@@ -197,7 +196,6 @@ PUBLIC void websFileOpen()
  */
 PUBLIC char *websGetIndex()
 {
-    printf(">>>>>>>>>>>>>>>>>>>>>>>>is here ???>>>>>>>>>>>>>>>>>>>>>>");
     return websIndex;
 }
 

+ 4 - 3
app/goahead-3.6.5/src/web_interface/src/dashboard.c

@@ -91,7 +91,7 @@ void getDeviceInfo(Webs *wp){
     cJSON_AddStringToObject(data, "ipAddr", IpAddr);
     cJSON_AddStringToObject(data, "netMode", "static");
 
-    pStr = cJSON_Print(root);
+    pStr = cJSON_PrintUnformatted(root);
 
     printf("---> cJSON Str:\n%s\n", pStr);
     websSetStatus(wp, 200);
@@ -151,7 +151,7 @@ void getSysInfo(Webs *wp){
     cJSON_AddStringToObject(data, "title", sysInfo.title);
     cJSON_AddStringToObject(data, "text", sysInfo.text);
 
-    pStr = cJSON_Print(root);
+    pStr = cJSON_PrintUnformatted(root);
 
     printf("---> cJSON Str:\n%s\n", pStr);
     websSetStatus(wp, 200);
@@ -269,6 +269,7 @@ void getSensorInfo(Webs *wp){
                 cJSON_AddItemToArray(pJsonArry,pJsonsub=cJSON_CreateObject()); /* 给创建的数组增加对对象*/
                 //cJSON_AddNumberToObject(pJsonsub, "sensorNum", pSensorBuff->sensor_num); 
                 cJSON_AddStringToObject(pJsonsub, "sensorName", pSensorBuff->sensor_name);
+
                 //cJSON_AddNumberToObject(pJsonsub, "ownerId",    pSensorBuff->owner_id);
                 //cJSON_AddNumberToObject(pJsonsub, "ownerNun",   pSensorBuff->owner_lun);
                 //cJSON_AddNumberToObject(pJsonsub, "sensorType", pSensorBuff->sensor_type);
@@ -312,7 +313,7 @@ void getSensorInfo(Webs *wp){
                 case 0x80:  cJSON_AddStringToObject(pJsonsub, "State", "Lower Non-Recoverable"); break;    
                 default:  cJSON_AddNumberToObject(pJsonsub, "State", pSensorBuff->sensor_state); break;      
                 }
-                
+         
                 pSensorBuff++;
                 nSensors--;
             }

+ 4 - 4
local/rc

@@ -11,7 +11,7 @@ ifconfig lo 127.0.0.1
 ################### install module #####################
 #insmod /usr/bin/test_module.ko
 insmod /usr/bin/gpio.ko 
-insmod /usr/bin/i2c.ko
+#insmod /usr/bin/i2c.ko
 #insmod /usr/bin/fmc.ko
 insmod /usr/bin/platform.ko
 #insmod /usr/bin/adc.ko
@@ -20,9 +20,9 @@ insmod /usr/bin/platform.ko
 #################### create node ########################
 #mknod /dev/test_module c 99 0
 mknod /dev/platform c 100 0
-mknod /dev/i2c1 c 101 0
-mknod /dev/i2c2 c 101 1
-mknod /dev/i2c3 c 101 2
+#mknod /dev/i2c1 c 101 0
+#mknod /dev/i2c2 c 101 1
+#mknod /dev/i2c3 c 101 2
 #mknod /dev/fmc_cpld c 102 0
 mknod /dev/gpio c 103 0 
 mknod /dev/adc1 c 105 0