Although I still don't see the whole picture, I think that your problem is
that you are using 8 bits for every element.
Now either it's 0:225 or -128 to +127.
So you probably have declared the struct that you send as int8_t[][] array.
Try to declare it as int16_t and don't forget that the default message
payload size is 28 bytes.

Arik


On Sat, Apr 10, 2010 at 23:39, Sindra Dk <[email protected]> wrote:

>  Hi all,
> im working on copression algorithm and i use TinyOS 2.x
> i send an image from PC to mote i decompressed it then when i resend it to
> PC
> i get an error on its pixels value:
>
> Original matrix
> uint8_t A[i][j]={{172,132,4,39},{23,127,5,4},{44,7,6,9},{77,211,19,5}};
>
> $ java TestSerial -comm ser...@com5:telos
> Sending packet 0
> ser...@com5:115200: resynchronising
> Sending packet 1
> Received packet sequence number 1
> l'affichage  est:-29  (wrong value)
> l'affichage  est:26
> l'affichage  est:-32
> l'affichage  est:-17
> l'affichage  est:-87  (wrong value)
> l'affichage  est:19
> l'affichage  est:-48
> l'affichage  est:5
> l'affichage  est:77
> l'affichage  est:17
> l'affichage  est:72
> l'affichage  est:-18
> l'affichage  est:-118
> l'affichage  est:-4
> l'affichage  est:85
> l'affichage  est:-8
>
> ***************************************
> Display matrix as C is:
> 227   (this is a true value)
> 26
> -32
> -17
> 169.5  (this is a true value)
> 19.5
> -48.5
> 5.5
> 77
> 17
> 72
> -18
> -118.5
> -4.5
> 85.5
> -8.5
> i don't know why i can't display values higher than 127!!!
> can any one help me please? and thanks in advance.
> Ragards,
> Sindra
>
> ------------------------------
> Hotmail : une messagerie fiable avec une protection anti-spam performante
> Inscrivez-vous <https://signup.live.com/signup.aspx?id=60969>
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Best Regards,
Arik Sapojnik
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to