mirror of
				https://e.coding.net/weidongshan/01_all_series_quickstart.git
				synced 2025-11-04 21:16:15 +08:00 
			
		
		
		
	add 5-6_基于JSON-RPC改造QT程序
This commit is contained in:
		
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							@@ -0,0 +1,33 @@
 | 
				
			|||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					start() {
 | 
				
			||||||
 | 
					echo -e "\033[9;0]" > /dev/tty0
 | 
				
			||||||
 | 
					export QT_QPA_GENERIC_PLUGINS=tslib:/dev/input/event1
 | 
				
			||||||
 | 
					export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0
 | 
				
			||||||
 | 
					export QT_QPA_FONTDIR=/usr/lib/fonts/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					psplash-write "PROGRESS 95"
 | 
				
			||||||
 | 
					psplash-write "QUIT"
 | 
				
			||||||
 | 
					/root/rpc_server &
 | 
				
			||||||
 | 
					sleep 5
 | 
				
			||||||
 | 
					/root/LED_and_TempHumi  &
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					stop() {
 | 
				
			||||||
 | 
					    killall LED_and_TempHumi
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					case "$1" in
 | 
				
			||||||
 | 
					    start)
 | 
				
			||||||
 | 
					        start
 | 
				
			||||||
 | 
					        ;;
 | 
				
			||||||
 | 
					    stop)
 | 
				
			||||||
 | 
					        stop
 | 
				
			||||||
 | 
					        ;;
 | 
				
			||||||
 | 
					    *)
 | 
				
			||||||
 | 
					        echo "Usage: $0 {start| stop|restart}"
 | 
				
			||||||
 | 
					        exit 1
 | 
				
			||||||
 | 
					esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					exit $?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -0,0 +1,32 @@
 | 
				
			|||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					insmod  /root/led_drv.ko
 | 
				
			||||||
 | 
					insmod  /root/dht11_drv.ko
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Start all init scripts in /etc/init.d
 | 
				
			||||||
 | 
					# executing them in numerical order.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					psplash -n & 
 | 
				
			||||||
 | 
					for i in /etc/init.d/S??* ;do
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					     # Ignore dangling symlinks (if any).
 | 
				
			||||||
 | 
					     [ ! -f "$i" ] && continue
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					     case "$i" in
 | 
				
			||||||
 | 
						*.sh)
 | 
				
			||||||
 | 
						    # Source shell script for speed.
 | 
				
			||||||
 | 
						    (
 | 
				
			||||||
 | 
							trap - INT QUIT TSTP
 | 
				
			||||||
 | 
							set start
 | 
				
			||||||
 | 
							. $i
 | 
				
			||||||
 | 
						    )
 | 
				
			||||||
 | 
						    ;;
 | 
				
			||||||
 | 
						*)
 | 
				
			||||||
 | 
						    # No sh extension, so fork subprocess.
 | 
				
			||||||
 | 
						    $i start
 | 
				
			||||||
 | 
						    ;;
 | 
				
			||||||
 | 
					    esac
 | 
				
			||||||
 | 
					done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/bin/hostname -F /etc/hostname
 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user