Skip to content

Commit

Permalink
small mod to onos_rf69_serial_transponder
Browse files Browse the repository at this point in the history
  • Loading branch information
marco committed Dec 6, 2016
1 parent 712f4a5 commit e64f541
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions arduino_code/onos_rf69_serial_transponder.ino
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ restart:
onos_cmd_start_position=-99;
onos_cmd_end_position=-99;
while (Serial.available() > 0) {
message_to_decode_avaible=1;

enable_answer_back=1;
// Serial.println(F("im"));
//Serial.println(counter);
Expand Down Expand Up @@ -629,6 +629,9 @@ restart:
counter=counter+1;
continue;
}
message_to_decode_avaible=1;



if ( (data_from_serial[counter-2]=='[')&&(data_from_serial[counter-1]=='S')&&(data_from_serial[counter]=='_') ){//
// Serial.println("cmd start found-------------------------------");
Expand Down Expand Up @@ -664,7 +667,7 @@ restart:

uint8_t message_copy[rx_msg_lenght+1];

strcpy(filtered_onos_message,"");
strcpy(filtered_onos_message,""); //clear the filtered_onos_message array


// Serial.println(onos_cmd_start_position);
Expand Down
4 changes: 2 additions & 2 deletions tests/problems_and_solutions
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ hardwareModelDict["RouterGL"]={"hwName":"RouterGL","max_pin":5,"hardware_type":"
after 10 times it will giveup.
During this phase (while the gateway is writing to a node or waiting answer from a node or receiving a message from the OnosCenter , any messages from others nodes will be ignored so they will retry to contact the node for 5 times and after that they will giveup (some nodes will have precendence and will also retry a number of time greater than others for example the allarm nodes)


Forse si può modificare per permettere il multithread...al momento devo aspettare che il modulo 232_To_radio faccia tutti i tentativi di trasmissione radio prima di iniziare a fare i tentativi per contattare il prossimo nodo radio..magari si può far gestire ad onoscenter il reinvio dei tentativi e fare un solo tentativo per query...in questo modo onoscenter può fare una richiesta , se fallisce può contattare un altro nodo e poi riprovare con il precedente! senza bloccarsi! (nota mettere comunque timeout se passano più di 2 minuti dal comando all'attuazione è sconveniente...)



Expand Down Expand Up @@ -1078,6 +1078,6 @@ hardwareModelDict["RouterGL"]={"hwName":"RouterGL","max_pin":5,"hardware_type":"
the node will send a syncmessage where it will tell onos the number of the objects it will send,the type of the object(to know how many bytes it will use) , the number of each object followed by the value of that object (variable byte lenght based on the type of obj that onos will get from the hardwareModelDict in globalVar.py)



51) The


0 comments on commit e64f541

Please sign in to comment.