mirror of
https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks.git
synced 2025-09-03 13:12:44 +02:00
Adds the current motor position to the api systeminfo. (#1579)
This commit is contained in:
@@ -13,6 +13,7 @@ CONFIGPATH=/system/sdcard/config
|
||||
BINPATH=/system/sdcard/bin
|
||||
SDPATH=/system/sdcard
|
||||
VERSION="v0.0.5 Beta"
|
||||
MOTOR=/system/sdcard/bin/motor.bin
|
||||
# END VARIABLES
|
||||
|
||||
# START FUNCTIONS
|
||||
@@ -149,6 +150,10 @@ if [ -n "$F_action" ]; then
|
||||
\"total\": $(cat /proc/meminfo | tr -s ' ' $'\t' | grep SwapTotal: | cut -f2),
|
||||
\"free\": $(cat /proc/meminfo | tr -s ' ' $'\t' | grep SwapFree: | cut -f2)
|
||||
}
|
||||
},
|
||||
\"motor\": {
|
||||
\"x\": $($MOTOR -d s | sed -n '1 p' | awk '{print $2}'),
|
||||
\"y\": $($MOTOR -d s | sed -n '2 p' | awk '{print $2}')
|
||||
}
|
||||
}
|
||||
}"
|
||||
|
Reference in New Issue
Block a user