mirror of
https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks.git
synced 2025-09-08 23:20:48 +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
|
BINPATH=/system/sdcard/bin
|
||||||
SDPATH=/system/sdcard
|
SDPATH=/system/sdcard
|
||||||
VERSION="v0.0.5 Beta"
|
VERSION="v0.0.5 Beta"
|
||||||
|
MOTOR=/system/sdcard/bin/motor.bin
|
||||||
# END VARIABLES
|
# END VARIABLES
|
||||||
|
|
||||||
# START FUNCTIONS
|
# START FUNCTIONS
|
||||||
@@ -149,6 +150,10 @@ if [ -n "$F_action" ]; then
|
|||||||
\"total\": $(cat /proc/meminfo | tr -s ' ' $'\t' | grep SwapTotal: | cut -f2),
|
\"total\": $(cat /proc/meminfo | tr -s ' ' $'\t' | grep SwapTotal: | cut -f2),
|
||||||
\"free\": $(cat /proc/meminfo | tr -s ' ' $'\t' | grep SwapFree: | 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