void sendCommand() {
  if(command_mode == 1) {
    LoRa.beginPacket();
    LoRa.print("Ping(");
    LoRa.print(set_ID_number);
    LoRa.print(")");
    LoRa.endPacket();
    ping_time = millis();
  }
  else if(command_mode != 0) {
    LoRa.beginPacket();
    LoRa.print("/");
    LoRa.write(command_mode + 97);
    LoRa.print("(");
    LoRa.print(set_ID_number);
    LoRa.print(")");
    LoRa.endPacket();
  }
}

void sendFireAll() {
  LoRa.beginPacket();
  LoRa.print("Fire_ALL");
  LoRa.endPacket();
}

void FireID() {
  LoRa.beginPacket();
  LoRa.print("Fire(");
  LoRa.print(ID_number);
  LoRa.print(")");
  LoRa.endPacket();
}

void sendTime() {
  LoRa.beginPacket();
  LoRa.print("Time[");
  LoRa.print(set_time);
  LoRa.print("]");
  LoRa.endPacket();
}

void sendStartTime() {
  LoRa.beginPacket();
  LoRa.print("Start");
  LoRa.endPacket();
}

void sendDelay() {
  LoRa.beginPacket();
  LoRa.print("Delay(");
  LoRa.print(set_ID_number);
  LoRa.print(")[");
  LoRa.print(ignation_delay);
  LoRa.print("]");
  LoRa.endPacket();
}

void sendUnitSetting() {
  LoRa.beginPacket();
  LoRa.print("Power(");
  LoRa.print(set_ID_number);
  LoRa.print(")[");
  LoRa.print(LoRa_unit_power);
  LoRa.print("]");
  LoRa.endPacket();
  delay(500);
  LoRa.beginPacket();
  LoRa.print("SF(");
  LoRa.print(set_ID_number);
  LoRa.print(")[");
  LoRa.print(LoRa_unit_SF);
  LoRa.print("]");
  LoRa.endPacket();
}

void sendAlias() {
  LoRa.beginPacket();
  LoRa.print("Alias(");
  LoRa.print(set_ID_number);
  LoRa.print(")[");
  LoRa.print(alias);
  LoRa.print("]");
  LoRa.endPacket();
}

void sendArmed(boolean armed) {
  if(armed) {
    LoRa.beginPacket();
    LoRa.print("Arm!");
    LoRa.endPacket();
  }
  else {
    LoRa.beginPacket();
    LoRa.print("Disarm!");
    LoRa.endPacket();
  }
}

long getTime(String msgEdit) {
  msgEdit.remove(0, (msgEdit.indexOf('[') + 1));
  msgEdit.remove(msgEdit.indexOf(']'), (msgEdit.length() - msgEdit.indexOf(']')));
  unsigned long msg_time = msgEdit.toInt();
  return msg_time;
}
