Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Doing NMEA command sequences with zsh ... ??!!
- X-seq: zsh-users 19243
- From: Vasiliy Ivanov <beelzebubbie.logs@xxxxxxxxx>
- To: meino.cramer@xxxxxx
- Subject: Re: Doing NMEA command sequences with zsh ... ??!!
- Date: Mon, 13 Oct 2014 23:27:52 +0600
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=10L+P7GBm/YZZIQNb8tdMyhwmjh+uxFNKACcJSwNLY0=; b=C9VkN0Rkr8G61pvEgRGW2H60DH3KoHMFBKJRqvMJeMGf4KgAAKtZb7orz5Qvp9HSyK OiOksR/Yp9ikR90rnXVzX/QdR2wOXaxp5l2QQN3FO3KzK6cp1reDJv8CxY9nf3QIH5dU HuNXgaM6frTXXBgjudQ4BecrGqa/iCYSvP3czsubjK189xHC+mMMnB2rm7hlgxoDibug MwEo5xbu+qFZ/QTEj3DCKYSp8TKaaBHmNfa9MxdYp1toXpgmg/xF3tBZb6elqoxhGupQ D5P9+jUXjMQgzx1bl+Ceyipn3novRnyzgveI9K7V4zVXVmG4a5fIF71hht74CKCqdbH+ r71Q==
- In-reply-to: <20141013155806.GA3825@solfire>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20141013155806.GA3825@solfire>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 13.10.2014 21:58, meino.cramer@xxxxxx wrote:
> Hi,
>
> To my embedded system (which runs zsh on Gentoo Linux ;) ) I have atteched an GPS receiver
> chip. This chip spits out NMEA sentences to an UART and is capable of receiving NMEA command
> seqyences.
>
> An NMEA command sequence consist of $<commandname><parameter,nextparameter,....><*><checksum>
>
> The checksum is the binary XOR of all characters between '$' and '*'. This checksum is given a
> an hexadecimal number.
>
> Since it is an embedded system, I would prefer to calculate this checksum with zsh only since
> it already runs if I am logged in.
>
> Is that possible in any way?
>
> Thank you very much in advance for any help! Best regards, mcc
Not digging deep into NMEA stuff, only some related hints:
% integer a b; a=16#e7; b=16#3c; print $(([#16]a^b));
16#DB
% c='abcABC'; for i in ${(s..)c}; do print $((#i)); done
97
98
99
65
66
67
- --
Regards,
Vasiliy Ivanov <beelzebubbie.logs@xxxxxxxxx>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJUPAuYAAoJEAnDj7eK12hqw4kH/01EFxLtISDFEdWXL1yP0D7v
tUOi0WZGWhAqPSJ+q+cgpXXnUePGQsQ/phNjikex/S2GyG2MyyWj0e20gN1CLd4R
nIwWdKiLwOsRA3uSgcKDl9APqGyrzwDiDIYBRu6/jbFqSYcmZ0xhc4ekPMlwdYxW
mWGimIUIUtx7XqZpWz+hAwxgB7Bfc+Ur2xmJEs0Y7/9nxqmWEUWeG/bV1W4KLpLn
svZ1fcSih9sPHwgs6dtqDspw4THUlHp2rhTpqqvo6G1qLh4MTxGigqBrZnXaIrps
eg2VUjYrk+R6UmmFmpVXeqeZcLeQxN4GUab3xx+EUFTcViCa7OFtl84Xk72tu2k=
=DWl7
-----END PGP SIGNATURE-----
Messages sorted by:
Reverse Date,
Date,
Thread,
Author