   // set the amount of rotation
   cmd->arguments[2] = HIGH_BYTE(deg);
   cmd->arguments[3] = LOW_BYTE(deg);
+  
+//  Serial.println(cmd->arguments[0]);
+//  Serial.println(cmd->arguments[1]);
+//  Serial.println(cmd->arguments[2]);
+//  Serial.println(cmd->arguments[3]);
   txflag = 1;
-}
+
+  // if (check_if_same_packet(&prev_packet,&send_packet)){
+  //   save_the_packet(&prev_packet,send_packet);
+  //   txflag = 1;
+  // }
+}

void radio_rxhandler(uint8_t pipe_number)
{
   rxflag = 1;
}

void loop() {
  uint32_t idle_period = Scheduler_Dispatch();
  if( idle_period){
     idle(idle_period); 
  }
}

void setSenderAddress(uint8_t* dest, uint8_t *src,int len){

}

void fireGun(uint8_t b){
  if( txflag == 1){
    if (send_packet.type = IR_COMMAND){
      return;
    }
  }
  send_packet.type = IR_COMMAND;
  
  pf_ir_command_t* cmd = &(send_packet.payload.ir_command);
  setSenderAddress(cmd->sender_address,my_addr,5);  
  cmd->ir_command = SEND_BYTE;
  cmd->ir_data = 0;
