Created by smaniotto on 05/04/18. Classe IHMEcranPrincipal définnissant le comportement du layout 'ecran_principal'.
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.actionnerSeance | ( | ) | [private] |
Méthode actionnerSeance() permettant de démarrer ou d'arrêter une séance en fonction de l'état actuel.
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.demarrerSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ETAT_SEANCE_ARRETEE, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ETAT_SEANCE_DEMARREE, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ETAT_SEANCE_PAUSE, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.etatSeance, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.idZonePrecedente, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.pauserSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.reprendreSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.SELECTION_ZONE_ROBOT, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.selectionnerZone().
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onClick().
{ Log.d("IHMEcranPrincipal", "actionnerSeance() état : " + etatSeance); // Démarrer ou arrêter la séance selon son état actuel switch (etatSeance) { case ETAT_SEANCE_ARRETEE: // La séance n'est pas commencée, il faut la démarrer if(idZonePrecedente == -1) // Si les zones n'ont pas été selectionnées selectionnerZone(SELECTION_ZONE_ROBOT, 0, 0); else // Sinon, on peut démarrer la séance { demarrerSeance(); etatSeance = ETAT_SEANCE_DEMARREE; } break; case ETAT_SEANCE_DEMARREE: // La séance est en cours, il faut la metre en pause pauserSeance(); etatSeance = ETAT_SEANCE_PAUSE; break; case ETAT_SEANCE_PAUSE: // La séance est en pause, il faut la reprendre reprendreSeance(); etatSeance = ETAT_SEANCE_DEMARREE; break; default: break; } }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.actualiserIHMAppareilsBluetooth | ( | boolean | tableEstConnectee, |
boolean | lanceurEstConnecte, | ||
boolean | ecranEstConnecte | ||
) | [private] |
Méthode actualiserIHMAppareilsBluetooth() permettant de modifier les voyants des appareils Bluetooth en fonction des appareils connectés
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.voyantEcran, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.voyantLanceur, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.voyantTable.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.verifierConnexionAppareilsBluetoothRequis().
{ if(tableEstConnectee) voyantTable.setImageResource(R.drawable.table_connectee); else voyantTable.setImageResource(R.drawable.table_deconnectee); if(lanceurEstConnecte) voyantLanceur.setImageResource(R.drawable.lanceur_connecte); else voyantLanceur.setImageResource(R.drawable.lanceur_deconnecte); if(ecranEstConnecte) voyantEcran.setImageResource(R.drawable.ecran_connecte); else voyantEcran.setImageResource(R.drawable.ecran_deconnecte); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.affecterMembresIHM | ( | ) | [private] |
Méthode affecterMembresIHM() permettant l'affectation des membres de l'IHM (boutons, barres de progressions, textes, ...) aux attributs correspondants.
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionEffetBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionFrequenceBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionNombreBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionPuissanceBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionRotationLanceur, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonActionSeance, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonAppliquerNomJoueur, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonArreterSeance, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonBluetooth, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonHistorique, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonParametres, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.spinnerListeJoueurs, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.texteValeurEffetBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.texteValeurFrequenceBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.texteValeurNombreBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.texteValeurPuissanceBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.texteValeurRotationLanceur, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.voyantEcran, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.voyantLanceur, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.voyantTable.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onCreate().
{ Log.d("IHMEcranPrincipal", "affecterMembresIHM()"); //editTextNomJoueur = (EditText) findViewById(R.id.editTextNomJoueur); boutonAppliquerNomJoueur = (ImageButton) findViewById(R.id.boutonAppliquerNomJoueur); boutonBluetooth = (ImageButton) findViewById(R.id.boutonBluetooth); boutonHistorique = (ImageButton) findViewById(R.id.boutonHistorique); boutonParametres = (ImageButton) findViewById(R.id.boutonParametres); voyantTable = (ImageView) findViewById(R.id.voyantTable); voyantLanceur = (ImageView) findViewById(R.id.voyantLanceur); voyantEcran = (ImageView) findViewById(R.id.voyantEcran); boutonActionSeance = (ImageView) findViewById(R.id.boutonActionSeance); boutonArreterSeance = (ImageView) findViewById(R.id.boutonArreterSeance); barreProgressionNombreBalles = (SeekBar) findViewById(R.id.barreProgressionNombreBalles); texteValeurNombreBalles = (TextView) findViewById(R.id.texteValeurNombreBalles); barreProgressionFrequenceBalles = (SeekBar) findViewById(R.id.barreProgressionFrequenceBalles); texteValeurFrequenceBalles = (TextView) findViewById(R.id.texteValeurFrequenceBalles); barreProgressionEffetBalles = (SeekBar) findViewById(R.id.barreProgressionEffetBalles); texteValeurEffetBalles = (TextView) findViewById(R.id.texteValeurEffetBalles); barreProgressionPuissanceBalles = (SeekBar) findViewById(R.id.barreProgressionPuissanceBalles); texteValeurPuissanceBalles = (TextView) findViewById(R.id.texteValeurPuissanceBalles); barreProgressionRotationLanceur = (SeekBar) findViewById(R.id.barreProgressionRotationLanceur); texteValeurRotationLanceur = (TextView) findViewById(R.id.texteValeurRotationLanceur); spinnerListeJoueurs = (Spinner)findViewById(R.id.spinnerListeJoueurs); spinnerListeJoueurs.setContentDescription("La liste des joueurs"); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ajouterJoueur | ( | ) | [private] |
Méthode ajouterJoueur() ajoutant un joueur saisit à la base de données.
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.creerListeJoueurs(), com.ttpa.iris.ttpamobile.ServeurBDD.insererJoueur(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.nomJoueur, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onClick(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.serveurBDD.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onClick().
{ AlertDialog.Builder ajoutJoueur = new AlertDialog.Builder(this); LayoutInflater factory = LayoutInflater.from(this); final View ajoutJoueurView = factory.inflate(R.layout.ajout_joueur, null); ajoutJoueur.setView(ajoutJoueurView); ajoutJoueur.setTitle("Ajouter un nouveau joueur"); ajoutJoueur.setPositiveButton("Valider", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { //Lorsque l'on cliquera sur le bouton "OK", on récupère l'EditText correspondant à notre vue personnalisée (cad à alertDialogView) EditText nomJoueur = (EditText)ajoutJoueurView.findViewById(R.id.editTextNom); Joueur joueur = new Joueur(nomJoueur.getText().toString()); long id = serveurBDD.insererJoueur(joueur); Log.d("IHMEcranPrincipal", "Nom joueur : " + nomJoueur.getText().toString() + " - id : " + id); Toast.makeText(getApplicationContext(), "Joueur " + nomJoueur.getText() + " ajouté", Toast.LENGTH_SHORT).show(); creerListeJoueurs(); } }); ajoutJoueur.setNegativeButton("Annuler", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { } }); ajoutJoueur.show(); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.appliquerParametresSeance | ( | ) | [private] |
Méthode appliquerParametresSeance() appliquant les valeurs des paramètres à l'objet parametresActuels.
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionEffetBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionFrequenceBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionNombreBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionPuissanceBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionRotationLanceur, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ETAT_SEANCE_ARRETEE, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.etatSeance, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.nomJoueur, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.parametresActuels, com.ttpa.iris.ttpamobile.ParametreSeance.setEffetBalles(), com.ttpa.iris.ttpamobile.ParametreSeance.setFrequenceBalles(), com.ttpa.iris.ttpamobile.ParametreSeance.setIntensiteEffet(), com.ttpa.iris.ttpamobile.ParametreSeance.setNombreBalles(), com.ttpa.iris.ttpamobile.ParametreSeance.setNomJoueur(), com.ttpa.iris.ttpamobile.ParametreSeance.setPuissanceBalles(), et com.ttpa.iris.ttpamobile.ParametreSeance.setRotation().
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.demarrerSeance(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onCreate().
{ Log.d("IHMEcranPrincipal", "appliquerParametresSeance()"); if(etatSeance == ETAT_SEANCE_ARRETEE) { parametresActuels.setNomJoueur(nomJoueur); parametresActuels.setNombreBalles((barreProgressionNombreBalles.getProgress() * 5) + 5); // 5 balles par palier, 5 balles minimum parametresActuels.setFrequenceBalles((barreProgressionFrequenceBalles.getProgress() * 5) + 30); // 5 balles par palier, 30 balles minimum String effet; int intensiteEffet = barreProgressionEffetBalles.getProgress() - 8; if (barreProgressionEffetBalles.getProgress() == 8) { effet = "Aucun"; intensiteEffet = 1; } else if (barreProgressionEffetBalles.getProgress() < 8) { effet = "Coupé"; intensiteEffet = 0 - intensiteEffet; } else effet = "Lifté"; parametresActuels.setEffetBalles(effet); parametresActuels.setIntensiteEffet(intensiteEffet); parametresActuels.setPuissanceBalles(barreProgressionPuissanceBalles.getProgress() + 1); // 1 minimum (soit 10% minimum) parametresActuels.setRotation(barreProgressionRotationLanceur.getProgress() * 5); // 5° par pallier } }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.arreterSeance | ( | boolean | seanceAEnregistrer | ) | [private] |
Méthode arreterSeance() permettant d'envoyer les trames correspondantes aux appareils Bluetooth du projet.
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionEffetBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionFrequenceBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionNombreBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionPuissanceBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionRotationLanceur, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonActionSeance, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonArreterSeance, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameArretPeripheriqueBluetoothEcran(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameArretPeripheriqueBluetoothLanceur(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameArretPeripheriqueBluetoothTable(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ETAT_SEANCE_ARRETEE, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.etatSeance, com.ttpa.iris.ttpamobile.ServeurBDD.insererSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.seanceEnCours, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.serveurBDD.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.calculerReussiteSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.incrementerBallesJouees(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierIHMBluetoothInsuffisant(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onClick().
{ Log.d("IHMEcranPrincipal", "arreterSeance()"); // Envoyer la trame d'arrêt à l'écran envoyerTrameArretPeripheriqueBluetoothEcran(); // Envoyer la trame d'arrêt au lanceur envoyerTrameArretPeripheriqueBluetoothLanceur(); // Envoyer la trame d'arrêt à la table envoyerTrameArretPeripheriqueBluetoothTable(); if (seanceAEnregistrer) { // Enregistrer la séance dans la base de données serveurBDD.insererSeance(seanceEnCours); } // Changer l'icône du bouton d'action boutonActionSeance.setImageResource(R.drawable.bouton_demarrer); boutonActionSeance.setEnabled(true); // Changer l'état et la visibilité du bouton d'arrêt de séance boutonArreterSeance.setEnabled(false); boutonArreterSeance.setVisibility(View.INVISIBLE); // Changer l'état de la séance etatSeance = ETAT_SEANCE_ARRETEE; // Changer les états des barres de paramétrage barreProgressionNombreBalles.setEnabled(true); barreProgressionFrequenceBalles.setEnabled(true); barreProgressionEffetBalles.setEnabled(true); barreProgressionPuissanceBalles.setEnabled(true); barreProgressionRotationLanceur.setEnabled(true); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.attendre | ( | int | tempsMillisecondes | ) | [private] |
Méthode attendre() permettant d'attendre un temps données.
tempsMillisecondes |
{ Log.d("IHMEcranPrincipal", "attendre()"); try { Thread.sleep(tempsMillisecondes); } catch (InterruptedException e) { e.printStackTrace(); } }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.calculerReussiteSeance | ( | int | zoneTouchee | ) | [private] |
Méthode calculerReussiteSeance() calculant le taux de réussite de la séance selon le nombre de balles ayant déjà touché l'objectif.
zoneTouchee | étant la zone de l'impacte |
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.arreterSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ballesJouees, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ballesReussies, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ETAT_SEANCE_DEMARREE, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.etatSeance, com.ttpa.iris.ttpamobile.Seance.getNombreBalles(), com.ttpa.iris.ttpamobile.Seance.getZoneObjectif(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.seanceEnCours, et com.ttpa.iris.ttpamobile.Seance.setTauxReussite().
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.traiterDonneesRecuesTable().
{ Log.d("IHMEcranPrincipal", "calculerReussiteSeance() zone touchée : " + zoneTouchee); if(etatSeance == ETAT_SEANCE_DEMARREE) { if (zoneTouchee != -1) // Si la balle a bien touché la table { if ((seanceEnCours.getZoneObjectif() != -1) && (seanceEnCours.getZoneObjectif() != 0)) { // Si l'objectif a été défini if (zoneTouchee == seanceEnCours.getZoneObjectif()) // Si la zone touchée est la même que l'objectif ballesReussies++; } else // Si aucun objectif n'a été défini: la table entière est l'objectif ballesReussies++; } seanceEnCours.setTauxReussite((float) ballesReussies / (float) seanceEnCours.getNombreBalles() * 100); if (ballesJouees == seanceEnCours.getNombreBalles()) arreterSeance(true); } }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.connexionBaseDeDonnees | ( | ) | [private] |
Méthode connexionBaseDeDonnees() permettant la création puis la connexion à la base de données.
Références com.ttpa.iris.ttpamobile.ServeurBDD.open(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.serveurBDD.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onCreate().
{ Log.d("IHMEcranPrincipal", "connexionBaseDeDonnees()"); serveurBDD = new ServeurBDD(this); serveurBDD.open(); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.connexionPeripheriqueBluetoothEcran | ( | BluetoothDevice | appareilBluetooth | ) | [private] |
Méthode connexionPeripheriqueBluetoothEcran() permettant la connexion Bluetooth à l'écran.
appareilBluetooth | étant le Bluetooth de l'écran |
Références com.ttpa.iris.ttpamobile.PeripheriqueBluetooth.connecter(), com.ttpa.iris.ttpamobile.PeripheriqueBluetooth.estConnecte(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.handler, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.peripheriqueBluetoothEcran.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.connexionPeripheriquesBluetooth().
{ Log.d("IHMEcranPrincipal", "connexionPeripheriqueBluetoothEcran()"); peripheriqueBluetoothEcran = new PeripheriqueBluetooth(appareilBluetooth, handler); //Toast.makeText(getApplicationContext(), "Connexion à l'écran ...", Toast.LENGTH_SHORT).show(); peripheriqueBluetoothEcran.connecter(); //attendre(2000); if (peripheriqueBluetoothEcran.estConnecte()) Toast.makeText(getApplicationContext(), "Ecran connecté !", Toast.LENGTH_SHORT).show(); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.connexionPeripheriqueBluetoothLanceur | ( | BluetoothDevice | appareilBluetooth | ) | [private] |
Méthode connexionPeripheriqueBluetoothLanceur() permettant la connexion Bluetooth du lanceur.
appareilBluetooth | étant le Bluetooth du lanceur |
Références com.ttpa.iris.ttpamobile.PeripheriqueBluetooth.connecter(), com.ttpa.iris.ttpamobile.PeripheriqueBluetooth.estConnecte(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.handler, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.peripheriqueBluetoothLanceur.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.connexionPeripheriquesBluetooth().
{ Log.d("IHMEcranPrincipal", "connexionPeripheriqueBluetoothLanceur()"); peripheriqueBluetoothLanceur = new PeripheriqueBluetooth(appareilBluetooth, handler); //Toast.makeText(getApplicationContext(), "Connexion au lanceur ...", Toast.LENGTH_SHORT).show(); peripheriqueBluetoothLanceur.connecter(); //attendre(2000); if (peripheriqueBluetoothLanceur.estConnecte()) Toast.makeText(getApplicationContext(), "Lanceur connecté !", Toast.LENGTH_SHORT).show(); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.connexionPeripheriqueBluetoothTable | ( | BluetoothDevice | appareilBluetooth | ) | [private] |
Méthode connexionPeripheriqueBluetoothTable() permettant la connexion Bluetooth à la table.
appareilBluetooth | étant le Bluetooth de la table |
Références com.ttpa.iris.ttpamobile.PeripheriqueBluetooth.connecter(), com.ttpa.iris.ttpamobile.PeripheriqueBluetooth.estConnecte(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.handler, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.peripheriqueBluetoothTable.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.connexionPeripheriquesBluetooth().
{ Log.d("IHMEcranPrincipal", "connexionPeripheriqueBluetoothTable()"); peripheriqueBluetoothTable = new PeripheriqueBluetooth(appareilBluetooth, handler); //Toast.makeText(getApplicationContext(), "Connexion à la table ...", Toast.LENGTH_SHORT).show(); peripheriqueBluetoothTable.connecter(); //attendre(2000); if (peripheriqueBluetoothTable.estConnecte()) Toast.makeText(getApplicationContext(), "Table connectée !", Toast.LENGTH_SHORT).show(); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.connexionPeripheriquesBluetooth | ( | ) | [private] |
Méthode connexionPeripheriquesBluetooth() permetant la connexion aux appareils Bluetooth du projet détectés.
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.connexionPeripheriqueBluetoothEcran(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.connexionPeripheriqueBluetoothLanceur(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.connexionPeripheriqueBluetoothTable(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.deconnexionPeripheriquesBluetooth(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.devices, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.handler, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.NOM_PERIPHERIQUE_BLUETOOTH_ECRAN, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.NOM_PERIPHERIQUE_BLUETOOTH_LANCEUR, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.NOM_PERIPHERIQUE_BLUETOOTH_TABLE, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.peripheriques.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.demarrageBluetooth().
{ Log.d("IHMEcranPrincipal", "connexionPeripheriquesBluetooth()"); // Déconnexion de tous les appareils avant une possible connexion deconnexionPeripheriquesBluetooth(); for (BluetoothDevice appareilBluetooth : devices) { //Toast.makeText(getApplicationContext(), "Périphérique = " + appareilBluetooth.getName(), Toast.LENGTH_SHORT).show(); peripheriques.add(new PeripheriqueBluetooth(appareilBluetooth, handler)); switch (appareilBluetooth.getName()) { case NOM_PERIPHERIQUE_BLUETOOTH_ECRAN: connexionPeripheriqueBluetoothEcran(appareilBluetooth); break; case NOM_PERIPHERIQUE_BLUETOOTH_TABLE: connexionPeripheriqueBluetoothTable(appareilBluetooth); break; case NOM_PERIPHERIQUE_BLUETOOTH_LANCEUR: connexionPeripheriqueBluetoothLanceur(appareilBluetooth); break; default: break; } } if(peripheriques.size() == 0) { Toast.makeText(getApplicationContext(), "Aucun périphérique détecté ! ", Toast.LENGTH_SHORT).show(); } }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.creerListeJoueurs | ( | ) | [private] |
Méthode creerListeJoueurs() créant la liste des joueurs présents dans la base de données
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameConnexionPeripheriqueBluetoothEcran(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ETAT_SEANCE_ARRETEE, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.etatSeance, com.ttpa.iris.ttpamobile.Joueur.getId(), com.ttpa.iris.ttpamobile.ServeurBDD.getIdJoueurParametres(), com.ttpa.iris.ttpamobile.ServeurBDD.getJoueur(), com.ttpa.iris.ttpamobile.ServeurBDD.getJoueurs(), com.ttpa.iris.ttpamobile.Joueur.getNom(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.nomJoueur, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.parametresActuels, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.serveurBDD, com.ttpa.iris.ttpamobile.ServeurBDD.setIdJoueurParametres(), com.ttpa.iris.ttpamobile.ParametreSeance.setNomJoueur(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.spinnerListeJoueurs.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ajouterJoueur(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onCreate().
{ final List<Joueur> listeJoueurs = serveurBDD.getJoueurs(); final List<String> noms = new ArrayList<String>(); // le dernier joueur a avoir utilisé l'application int idJoueur = serveurBDD.getIdJoueurParametres(); for(int i = 0; i < listeJoueurs.size(); i++) { Joueur joueur = listeJoueurs.get(i); if(joueur.getId() == idJoueur) { noms.add(joueur.getNom()); break; } } for(int i = 0; i < listeJoueurs.size(); i++) { Joueur joueur = listeJoueurs.get(i); if(joueur.getId() == idJoueur) continue; noms.add(joueur.getNom()); } ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, noms); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spinnerListeJoueurs.setAdapter(adapter); spinnerListeJoueurs.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> arg0, View arg1, int position, long id) { Joueur joueur = serveurBDD.getJoueur(noms.get(position)); Log.d("IHMEcranPrincipal", "Nom joueur séléctionné : " + noms.get(position)); // On conserve son id pour la prochaine session serveurBDD.setIdJoueurParametres(joueur.getId()); nomJoueur = joueur.getNom(); if(etatSeance == ETAT_SEANCE_ARRETEE) parametresActuels.setNomJoueur(nomJoueur); // On envoi l'information à l'écran, si la séance n'a pas encore été démarrée envoyerTrameConnexionPeripheriqueBluetoothEcran(); } @Override public void onNothingSelected(AdapterView<?> arg0) { } }); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.deconnexionPeripheriquesBluetooth | ( | ) | [private] |
Méthode deconnexionPeripheriquesBluetooth() permetant la déconnexion des appareils Bluetooth du projet connectés.
Références com.ttpa.iris.ttpamobile.PeripheriqueBluetooth.deconnecter(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierIHMBluetoothInsuffisant(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.peripheriqueBluetoothEcran, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.peripheriqueBluetoothLanceur, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.peripheriqueBluetoothTable.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.connexionPeripheriquesBluetooth().
{ Log.d("IHMEcranPrincipal", "deconnexionPeripheriquesBluetooth()"); if(peripheriqueBluetoothEcran != null) peripheriqueBluetoothEcran.deconnecter(true); if(peripheriqueBluetoothTable != null) peripheriqueBluetoothTable.deconnecter(true); if(peripheriqueBluetoothLanceur != null) peripheriqueBluetoothLanceur.deconnecter(true); modifierIHMBluetoothInsuffisant(); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.demarrageBluetooth | ( | ) | [private] |
Méthode demarrageBluetooth() permettant le déamrrage du Bluetooth puis la connexion automatique aux appareils du projet.
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.adaptateurBluetooth, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.connexionPeripheriquesBluetooth(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.devices, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierIHMBluetoothInsuffisant(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.peripheriques, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.REQUEST_CODE_ENABLE_BLUETOOTH.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onClick(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onCreate().
{ Log.d("IHMEcranPrincipal", "demarrageBluetooth()"); adaptateurBluetooth = BluetoothAdapter.getDefaultAdapter(); if (adaptateurBluetooth == null) { Toast.makeText(getApplicationContext(), "Bluetooth non activé !", Toast.LENGTH_SHORT).show(); modifierIHMBluetoothInsuffisant(); } else { if (!adaptateurBluetooth.isEnabled()) { Toast.makeText(getApplicationContext(), "Bluetooth non activé !", Toast.LENGTH_SHORT).show(); modifierIHMBluetoothInsuffisant(); Intent activeBlueTooth = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); startActivityForResult(activeBlueTooth, REQUEST_CODE_ENABLE_BLUETOOTH); //bluetoothAdapter.enable(); } else { Toast.makeText(getApplicationContext(), "Bluetooth activé, recherche en cours...", Toast.LENGTH_LONG).show(); // Recherche des périphériques connus peripheriques = new ArrayList<PeripheriqueBluetooth>(); devices = adaptateurBluetooth.getBondedDevices(); // Connexion aux appareils Bluetooth du projet détectés connexionPeripheriquesBluetooth(); } } }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.demarrerSeance | ( | ) | [private] |
Méthode demarrerSeance() permettant d'envoyer les trames correspondantes aux appareils Bluetooth du projet.
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.appliquerParametresSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ballesJouees, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ballesReussies, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionEffetBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionFrequenceBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionNombreBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionPuissanceBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionRotationLanceur, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonActionSeance, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonArreterSeance, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameDebutSeancePeripheriqueBluetoothEcran(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameDebutSeancePeripheriqueBluetoothLanceur(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameParametrageSeancePeripheriqueBluetoothEcran(), com.ttpa.iris.ttpamobile.ParametreSeance.getEffetComplet(), com.ttpa.iris.ttpamobile.ParametreSeance.getFrequenceBalles(), com.ttpa.iris.ttpamobile.ServeurBDD.getIdJoueurParametres(), com.ttpa.iris.ttpamobile.ParametreSeance.getIntensiteEffet(), com.ttpa.iris.ttpamobile.ParametreSeance.getNombreBalles(), com.ttpa.iris.ttpamobile.ParametreSeance.getPuissanceBalles(), com.ttpa.iris.ttpamobile.ParametreSeance.getRotation(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.parametresActuels, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.seanceEnCours, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.serveurBDD, com.ttpa.iris.ttpamobile.Seance.setIdJoueur(), com.ttpa.iris.ttpamobile.Seance.setZoneObjectif(), com.ttpa.iris.ttpamobile.Seance.setZoneRobot(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.zoneObjectif, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.zoneRobot.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.actionnerSeance().
{ Log.d("IHMEcranPrincipal", "demarrerSeance()"); // Lire les valeurs des paramètres actuels afin de les appliquer aux paramètres de la séance appliquerParametresSeance(); // Envoyer la trame de paramétrage à l'écran, puis la trame de début de séance envoyerTrameDebutSeancePeripheriqueBluetoothEcran(); envoyerTrameParametrageSeancePeripheriqueBluetoothEcran(); // On applique les paramètres actuels à la séance en cours seanceEnCours = new Seance(parametresActuels.getFrequenceBalles(), parametresActuels.getNombreBalles(), parametresActuels.getEffetComplet(), parametresActuels.getIntensiteEffet(), parametresActuels.getPuissanceBalles(), parametresActuels.getRotation()); seanceEnCours.setIdJoueur(serveurBDD.getIdJoueurParametres()); seanceEnCours.setZoneObjectif(zoneObjectif); seanceEnCours.setZoneRobot(zoneRobot); // Mettre à zéro les statistiques ballesJouees = 0; ballesReussies = 0; // Envoyer la trame de départ au lanceur envoyerTrameDebutSeancePeripheriqueBluetoothLanceur(); // Changer l'icône du bouton d'action boutonActionSeance.setImageResource(R.drawable.bouton_pause); // Changer l'état et la visibilité du bouton d'arrêt de séance boutonArreterSeance.setEnabled(true); boutonArreterSeance.setVisibility(View.VISIBLE); // Changer les états des barres de paramétrage barreProgressionNombreBalles.setEnabled(false); barreProgressionFrequenceBalles.setEnabled(false); barreProgressionEffetBalles.setEnabled(false); barreProgressionPuissanceBalles.setEnabled(false); barreProgressionRotationLanceur.setEnabled(false); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameArretPeripheriqueBluetoothEcran | ( | ) | [private] |
Méthode envoyerTrameArretPeripheriqueBluetoothEcran() envoyant la trame de finde séance à l'écran
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTramePeripheriqueBluetoothEcran(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_ECRAN_FIN_SEANCE.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.arreterSeance().
{ Log.d("IHMEcranPrincipal", "envoyerTrameArretPeripheriqueBluetoothEcran()"); envoyerTramePeripheriqueBluetoothEcran(TRAME_ECRAN_FIN_SEANCE); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameArretPeripheriqueBluetoothLanceur | ( | ) | [private] |
Méthode envoyerTrameArretPeripheriqueBluetoothLanceur() envoyant la trame de fin de séance au lanceur.
Références com.ttpa.iris.ttpamobile.PeripheriqueBluetooth.envoyer(), com.ttpa.iris.ttpamobile.PeripheriqueBluetooth.estConnecte(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.peripheriqueBluetoothLanceur, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_LANCEUR_ARRET_SEANCE.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.arreterSeance().
{ Log.d("IHMEcranPrincipal", "envoyerTrameArretPeripheriqueBluetoothLanceur()"); if (peripheriqueBluetoothLanceur != null) { if (peripheriqueBluetoothLanceur.estConnecte()) { peripheriqueBluetoothLanceur.envoyer(TRAME_LANCEUR_ARRET_SEANCE); Log.d("IHMEcranPrincipal", "Trame arrêt séance Lanceur : " + TRAME_LANCEUR_ARRET_SEANCE); } } }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameArretPeripheriqueBluetoothTable | ( | ) | [private] |
Méthode envoyerTrameArretPeripheriqueBluetoothTable() envoyant la trame de fin de séance au lanceur.
Références com.ttpa.iris.ttpamobile.PeripheriqueBluetooth.envoyer(), com.ttpa.iris.ttpamobile.PeripheriqueBluetooth.estConnecte(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.peripheriqueBluetoothTable, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_TABLE_ARRET_SEANCE.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.arreterSeance().
{ Log.d("IHMEcranPrincipal", "envoyerTrameArretPeripheriqueBluetoothTable()"); if (peripheriqueBluetoothTable != null) { if (peripheriqueBluetoothTable.estConnecte()) { peripheriqueBluetoothTable.envoyer(TRAME_TABLE_ARRET_SEANCE); Log.d("IHMEcranPrincipal", "Trame arrêt séance Table : " + TRAME_TABLE_ARRET_SEANCE); } } }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameConnexionPeripheriqueBluetoothEcran | ( | ) | [private] |
Méthode envoyerTrameConnexionPeripheriqueBluetoothEcran() envoyant la trame de connexion à l'écran.
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTramePeripheriqueBluetoothEcran(), com.ttpa.iris.ttpamobile.ParametreSeance.getNomJoueur(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.parametresActuels, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_ENTETE.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.creerListeJoueurs(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onClick().
{ Log.d("IHMEcranPrincipal", "envoyerTrameConnexionPeripheriqueBluetoothEcran()"); String trame = TRAME_ENTETE + ":CONNECT:" + parametresActuels.getNomJoueur(); envoyerTramePeripheriqueBluetoothEcran(trame); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameDebutSeancePeripheriqueBluetoothEcran | ( | ) | [private] |
Méthode envoyerTrameFinParametrageSeancePeripheriqueBluetoothEcran() envoyant la trame de fin de paramétrage à l'écran.
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTramePeripheriqueBluetoothEcran(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_ECRAN_DEBUT_SEANCE.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.demarrerSeance().
{ Log.d("IHMEcranPrincipal", "envoyerTrameDebutSeancePeripheriqueBluetoothEcran()"); envoyerTramePeripheriqueBluetoothEcran(TRAME_ECRAN_DEBUT_SEANCE); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameDebutSeancePeripheriqueBluetoothLanceur | ( | ) | [private] |
Méthode envoyerTrameDebutSeancePeripheriqueBluetoothLanceur() envoyant la trame de début de séance au lanceur.
Références com.ttpa.iris.ttpamobile.PeripheriqueBluetooth.envoyer(), com.ttpa.iris.ttpamobile.PeripheriqueBluetooth.estConnecte(), com.ttpa.iris.ttpamobile.ParametreSeance.getEffet(), com.ttpa.iris.ttpamobile.ParametreSeance.getFrequenceBalles(), com.ttpa.iris.ttpamobile.ParametreSeance.getIntensiteEffet(), com.ttpa.iris.ttpamobile.ParametreSeance.getNombreBalles(), com.ttpa.iris.ttpamobile.ParametreSeance.getPuissanceBalles(), com.ttpa.iris.ttpamobile.ParametreSeance.getRotation(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.parametresActuels, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.peripheriqueBluetoothLanceur, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_ENTETE, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_FIN.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.demarrerSeance().
{ Log.d("IHMEcranPrincipal", "envoyerTrameDebutSeancePeripheriqueBluetoothLanceur()"); if (peripheriqueBluetoothLanceur != null) { if (peripheriqueBluetoothLanceur.estConnecte()) { String trame = TRAME_ENTETE + ":SET:" + parametresActuels.getEffet() + ":" + parametresActuels.getIntensiteEffet() + ":" + parametresActuels.getPuissanceBalles() + ":" + parametresActuels.getFrequenceBalles() + ":" + parametresActuels.getRotation() + ":" + parametresActuels.getNombreBalles() + TRAME_FIN; peripheriqueBluetoothLanceur.envoyer(trame); Log.d("IHMEcranPrincipal", "Trame départ séance Lanceur : " + trame); } } }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameParametrageSeancePeripheriqueBluetoothEcran | ( | ) | [private] |
Méthode envoyerTrameParametrageSeancePeripheriqueBluetoothEcran() envoyant la trame de paramétrage à l'écran.
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTramePeripheriqueBluetoothEcran(), com.ttpa.iris.ttpamobile.ParametreSeance.getNombreBalles(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.parametresActuels, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_ENTETE, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.zoneObjectif, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.zoneRobot.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.demarrerSeance().
{ Log.d("IHMEcranPrincipal", "envoyerTrameParametrageSeancePeripheriqueBluetoothEcran()"); String trame = TRAME_ENTETE + ":SETSEANCE:" + zoneRobot + ":" + zoneObjectif + ":" + parametresActuels.getNombreBalles(); envoyerTramePeripheriqueBluetoothEcran(trame); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTramePeripheriqueBluetoothEcran | ( | String | trame | ) | [private] |
Méthode envoyerTramePeripheriqueBluetoothEcran() envoyant la trame à l'écran, si l'écran est connecté.
trame | étant la trame à envoyer |
Références com.ttpa.iris.ttpamobile.PeripheriqueBluetooth.envoyer(), com.ttpa.iris.ttpamobile.PeripheriqueBluetooth.estConnecte(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.peripheriqueBluetoothEcran.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameArretPeripheriqueBluetoothEcran(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameConnexionPeripheriqueBluetoothEcran(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameDebutSeancePeripheriqueBluetoothEcran(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameParametrageSeancePeripheriqueBluetoothEcran(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.pauserSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.reprendreSeance(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.traiterDonneesRecuesTable().
{ Log.d("IHMEcranPrincipal", "envoyerTramePeripheriqueBluetoothEcran()"); if(peripheriqueBluetoothEcran != null) { if (peripheriqueBluetoothEcran.estConnecte()) peripheriqueBluetoothEcran.envoyer(trame); } }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTramePeripheriqueBluetoothLanceur | ( | String | trame | ) | [private] |
Méthode envoyerTramePeripheriqueBluetoothLanceur() envoyant la trame au lanceur, si le lanceur est connecté.
trame | étant la trame à envoyer |
Références com.ttpa.iris.ttpamobile.PeripheriqueBluetooth.envoyer(), com.ttpa.iris.ttpamobile.PeripheriqueBluetooth.estConnecte(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.peripheriqueBluetoothLanceur.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.pauserSeance(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.reprendreSeance().
{ Log.d("IHMEcranPrincipal", "envoyerTramePeripheriqueBluetoothLanceur()"); if(peripheriqueBluetoothLanceur != null) { if (peripheriqueBluetoothLanceur.estConnecte()) peripheriqueBluetoothLanceur.envoyer(trame); } }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameRepriseSeancePeripheriqueBluetoothLanceur | ( | ) | [private] |
Méthode envoyerTrameRepriseSeancePeripheriqueBluetoothLanceur() envoyant la trame de dreprise de séance au lanceur.
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ballesJouees, com.ttpa.iris.ttpamobile.PeripheriqueBluetooth.envoyer(), com.ttpa.iris.ttpamobile.PeripheriqueBluetooth.estConnecte(), com.ttpa.iris.ttpamobile.ParametreSeance.getEffet(), com.ttpa.iris.ttpamobile.ParametreSeance.getFrequenceBalles(), com.ttpa.iris.ttpamobile.ParametreSeance.getIntensiteEffet(), com.ttpa.iris.ttpamobile.ParametreSeance.getNombreBalles(), com.ttpa.iris.ttpamobile.ParametreSeance.getPuissanceBalles(), com.ttpa.iris.ttpamobile.ParametreSeance.getRotation(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.parametresActuels, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.peripheriqueBluetoothLanceur, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_ENTETE, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_FIN.
{ Log.d("IHMEcranPrincipal", "envoyerTrameRepriseSeancePeripheriqueBluetoothLanceur()"); if (peripheriqueBluetoothLanceur != null) { if (peripheriqueBluetoothLanceur.estConnecte()) { String trame = TRAME_ENTETE + ":SET:" + parametresActuels.getEffet() + ":" + parametresActuels.getIntensiteEffet() + ":" + parametresActuels.getPuissanceBalles() + ":" + parametresActuels.getFrequenceBalles() + ":" + parametresActuels.getRotation() + ":" + (parametresActuels.getNombreBalles() - ballesJouees) + TRAME_FIN; peripheriqueBluetoothLanceur.envoyer(trame); Log.d("IHMEcranPrincipal", "Trame reprise séance Lanceur : " + trame); } } }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.incrementerBallesJouees | ( | ) | [private] |
Méthode incrementerBallesJouees() permettant de traiter les nombre de balles jouées de la séance, et d'arrêter la séance si la dernière balle est en dehors.
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.arreterSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ballesJouees, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonActionSeance, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ETAT_SEANCE_DEMARREE, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.etatSeance, com.ttpa.iris.ttpamobile.Seance.getNombreBalles(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.seanceEnCours.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.traiterDonneesRecuesTable().
{ Log.d("IHMEcranPrincipal", "incrementerBallesJouees()"); if(etatSeance == ETAT_SEANCE_DEMARREE) { ++ballesJouees; if (ballesJouees == seanceEnCours.getNombreBalles()) { boutonActionSeance.setEnabled(false); final Timer timerAsync = new Timer(); final TimerTask timerTaskAsync = new TimerTask() { @Override public void run() { runOnUiThread(new Runnable() { @Override public void run() { if(etatSeance == ETAT_SEANCE_DEMARREE) arreterSeance(true); timerAsync.cancel(); } }); } }; timerAsync.schedule(timerTaskAsync, 2000, 2000); } } }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierIHMBluetoothInsuffisant | ( | ) | [private] |
Méthode modifierIHMBluetoothInsuffisant() appellée lorsque le Bluetooth n'est pas activé ou que les appareils nécessaires ne sont pas présents/connectés
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.arreterSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonActionSeance, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonBluetooth, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonParametres, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.COULEUR_BOUTON_ROUGE.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.deconnexionPeripheriquesBluetooth(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.demarrageBluetooth(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.verifierConnexionAppareilsBluetoothRequis().
{ Log.d("IHMEcranPrincipal", "modifierIHMBluetoothInsuffisant()"); // Arrêter la séance en cours, sans enregistrer arreterSeance(false); // Modifier la couleur du bouton Bluetooth boutonBluetooth.setBackgroundColor(COULEUR_BOUTON_ROUGE); // Modifier la couleur du bouton réglages des zones boutonParametres.setBackgroundColor(COULEUR_BOUTON_ROUGE); // Autoriser le réglage des zones boutonParametres.setEnabled(false); // Changer l'icône du bouton d'action boutonActionSeance.setImageResource(R.drawable.bouton_demarrer_desactive); // Empêcher une séance d'être jouée boutonActionSeance.setEnabled(false); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierIHMBluetoothOperationnel | ( | ) | [private] |
Méthode modifierIHMBluetoothOperationnel() appellée lorsque tous les appareils Bluetooth sont connectés.
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonActionSeance, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonBluetooth, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonParametres, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.COULEUR_BOUTON_VERT.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.verifierConnexionAppareilsBluetoothRequis().
{ Log.d("IHMEcranPrincipal", "modifierIHMBluetoothOperationnel()"); // Modifier la couleur du bouton Bluetooth boutonBluetooth.setBackgroundColor(COULEUR_BOUTON_VERT); // Modifier la couleur du bouton réglages des zones boutonParametres.setBackgroundColor(COULEUR_BOUTON_VERT); // Autoriser le réglage des zones boutonParametres.setEnabled(true); // Changer l'icône du bouton d'action boutonActionSeance.setImageResource(R.drawable.bouton_demarrer); // Autoriser le déroulement d'une séance boutonActionSeance.setEnabled(true); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierIHMBluetoothSuffisant | ( | ) | [private] |
Méthode modifierIHMBluetoothSuffisant() appellée lorsque les appareils Bluetooth nécessaires sont connectés.
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonActionSeance, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonBluetooth, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonParametres, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.COULEUR_BOUTON_ORANGE, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.COULEUR_BOUTON_VERT.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.verifierConnexionAppareilsBluetoothRequis().
{ Log.d("IHMEcranPrincipal", "modifierIHMBluetoothSuffisant()"); // Modifier la couleur du bouton Bluetooth boutonBluetooth.setBackgroundColor(COULEUR_BOUTON_ORANGE); // Modifier la couleur du bouton réglages des zones boutonParametres.setBackgroundColor(COULEUR_BOUTON_VERT); // Autoriser le réglage des zones boutonParametres.setEnabled(true); // Changer l'icône du bouton d'action boutonActionSeance.setImageResource(R.drawable.bouton_demarrer); // Autoriser le déroulement d'une séance boutonActionSeance.setEnabled(true); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierValeursParametresIHM | ( | ) | [private] |
Méthode modifierValeursParametresIHM() modifiant les valeurs des champs de paramètre en fonction de leur barre de progression correspondante.
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionEffetBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionFrequenceBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionNombreBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionPuissanceBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionRotationLanceur, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.texteValeurEffetBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.texteValeurFrequenceBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.texteValeurNombreBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.texteValeurPuissanceBalles, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.texteValeurRotationLanceur.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onCreate(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onProgressChanged().
{ Log.d("IHMEcranPrincipal", "modifierValeursParametresIHM()"); texteValeurNombreBalles.setText(((barreProgressionNombreBalles.getProgress() * 5) + 5) + " balles"); // 5 balles par palier, 5 balles minimum texteValeurFrequenceBalles.setText(((barreProgressionFrequenceBalles.getProgress() * 5) + 30) + " balles/min"); // 5 balles par palier, 30 balles minimum String effet; int intensiteEffet = barreProgressionEffetBalles.getProgress() - 8; if (barreProgressionEffetBalles.getProgress() == 8) effet = "Aucun"; else if (barreProgressionEffetBalles.getProgress() < 8) { effet = "Coupé"; intensiteEffet = 0 - intensiteEffet; } else effet = "Lifté"; switch(effet) { case "Aucun": texteValeurEffetBalles.setText(effet); break; default: texteValeurEffetBalles.setText(effet + " " + intensiteEffet); // 10% par palier } texteValeurPuissanceBalles.setText(((barreProgressionPuissanceBalles.getProgress() * 10) + 10) + "%"); // 10% par pallier, 10% minimum String stringRotation; int rotationActuelle = barreProgressionRotationLanceur.getProgress() * 5; // 5° par pallier if(rotationActuelle > 45) stringRotation = (rotationActuelle - 45) + "° à droite"; else if(rotationActuelle < 45) stringRotation = (45 - rotationActuelle) + "° à gauche"; else stringRotation = (rotationActuelle - 45) + "°"; texteValeurRotationLanceur.setText(stringRotation); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onClick | ( | View | element | ) |
Méthode onCLick pour la gestion de l'évènement d'un click.
element | étant la vue sur laquelle l'utilisateur a cliqué. |
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.actionnerSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ajouterJoueur(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.arreterSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonActionSeance, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonAppliquerNomJoueur, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonArreterSeance, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonBluetooth, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonHistorique, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonParametres, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.demarrageBluetooth(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameConnexionPeripheriqueBluetoothEcran(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.nomJoueur, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.parametresActuels, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.redirectionActiviteHistorique(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.SELECTION_ZONE_ROBOT, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.selectionnerZone(), com.ttpa.iris.ttpamobile.ParametreSeance.setNomJoueur(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.verifierConnexionAppareilsBluetoothRequis().
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ajouterJoueur(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.selectionnerZone().
{ Log.d("IHMEcranPrincipal", "onClick()"); if(element == boutonAppliquerNomJoueur) { ajouterJoueur(); } else if(element == boutonBluetooth) { if(!verifierConnexionAppareilsBluetoothRequis()) // Si tous les appareils Bluetooth ne sont pas connectés { //Toast.makeText(getApplicationContext(), "Attendre..", Toast.LENGTH_SHORT).show(); demarrageBluetooth(); } } else if(element == boutonHistorique) { Log.d("IHMEcranPrincipal", "onClick() boutonHistorique"); // Redirection vers l'activité de l'historique des séances redirectionActiviteHistorique(); } else if(element == boutonParametres) { // Gérer le click sur le bouton paramétres (engrenage) selectionnerZone(SELECTION_ZONE_ROBOT, 0, 0); } else if(element == boutonActionSeance) { Log.d("IHMEcranPrincipal", "onClick() boutonActionSeance"); parametresActuels.setNomJoueur(nomJoueur); envoyerTrameConnexionPeripheriqueBluetoothEcran(); actionnerSeance(); } else if(element == boutonArreterSeance) { Log.d("IHMEcranPrincipal", "onClick() boutonArreterSeance"); arreterSeance(false); } }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onCreate | ( | Bundle | savedInstanceState | ) | [protected] |
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.affecterMembresIHM(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.appliquerParametresSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.connexionBaseDeDonnees(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.creerListeJoueurs(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.demarrageBluetooth(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierValeursParametresIHM(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.rendreBarresProgressionIHMUtilisables(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.rendreBoutonsIHMCliquables().
{ Log.d("IHMEcranPrincipal", "onCreate()"); super.onCreate(savedInstanceState); setContentView(R.layout.ecran_principal); // Affectation des membres de l'IHM affecterMembresIHM(); // Modifier les valeurs des champs de paramètre de l'IHM en fonction des états des barres de progression modifierValeursParametresIHM(); // Rendre les boutons présents dans l'IHM cliquables rendreBoutonsIHMCliquables(); // Rendre les barres de progression présents dans l'IHM utilisables rendreBarresProgressionIHMUtilisables(); // Connexion à la base de données connexionBaseDeDonnees(); // Crée une liste des joueurs enregistrés creerListeJoueurs(); // Appliquer les paramètres de séance actuels appliquerParametresSeance(); // Démarrage du Bluetooth puis connexion aux appareils du projet détectés demarrageBluetooth(); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onProgressChanged | ( | SeekBar | seekBar, |
int | progress, | ||
boolean | fromUser | ||
) |
Méthode onProgressChanged() appellée lorsqu'une barre de progression est modifiée.
seekBar | étant la barre de progression modifiée |
progress | étant le progrès actuel de la barre de progression modifiée |
fromUser |
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierValeursParametresIHM().
{ modifierValeursParametresIHM(); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onStartTrackingTouch | ( | SeekBar | seekBar | ) |
Méthode onStartTrackingTouch() appellée lorsqu'une barre de progression commence à être modifiée.
seekBar | étant la barre de progression modifiée |
{}
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onStopTrackingTouch | ( | SeekBar | seekBar | ) |
Méthode onStopTrackingTouch() appellée lorsqu'une barre de progression a fini d'être modifiée.
seekBar | étant la barre de progression modifiée |
{
//appliquerParametresSeance();
}
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.pauserSeance | ( | ) | [private] |
Méthode pauserSeance() permettant de mettre en pause un séance en cours.
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonActionSeance, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTramePeripheriqueBluetoothEcran(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTramePeripheriqueBluetoothLanceur(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ETAT_SEANCE_PAUSE, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.etatSeance, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_ECRAN_PAUSE_SEANCE, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_LANCEUR_PAUSE_SEANCE.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.actionnerSeance(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.traiterErreurRecueLanceur().
{ Log.d("IHMEcranPrincipal", "pauserSeance()"); // Changer l'icône du bouton d'action boutonActionSeance.setImageResource(R.drawable.bouton_reprendre); envoyerTramePeripheriqueBluetoothEcran(TRAME_ECRAN_PAUSE_SEANCE); envoyerTramePeripheriqueBluetoothLanceur(TRAME_LANCEUR_PAUSE_SEANCE); etatSeance = ETAT_SEANCE_PAUSE; }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.redirectionActiviteHistorique | ( | ) | [private] |
Méthode redirectionActiviteHistorique() démarrant l'activité IHMHistoriqueSeances permettant de visualiser l'historique des séances du joueur actuel.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onClick().
{ Log.d("IHMEcranPrincipal", "redirectionActiviteHistorique()"); Intent intent = new Intent(IHMEcranPrincipal.this, IHMHistoriqueSeances.class); startActivity(intent); }
Méthode rendreBarresProgressionIHMUtilisables()
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionEffetBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionFrequenceBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionNombreBalles, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionPuissanceBalles, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionRotationLanceur.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onCreate().
{ Log.d("IHMEcranPrincipal", "rendreBarresProgressionIHMUtilisables()"); barreProgressionNombreBalles.setOnSeekBarChangeListener(this); barreProgressionFrequenceBalles.setOnSeekBarChangeListener(this); barreProgressionEffetBalles.setOnSeekBarChangeListener(this); barreProgressionPuissanceBalles.setOnSeekBarChangeListener(this); barreProgressionRotationLanceur.setOnSeekBarChangeListener(this); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.rendreBoutonsIHMCliquables | ( | ) | [private] |
Méthode rendreBoutonsIHMCliquables()
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonActionSeance, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonAppliquerNomJoueur, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonArreterSeance, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonBluetooth, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonHistorique, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonParametres.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onCreate().
{ Log.d("IHMEcranPrincipal", "rendreBoutonsIHMCliquables()"); boutonAppliquerNomJoueur.setOnClickListener(this); boutonBluetooth.setOnClickListener(this); boutonHistorique.setOnClickListener(this); boutonParametres.setOnClickListener(this); boutonActionSeance.setOnClickListener(this); boutonArreterSeance.setOnClickListener(this); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.reprendreSeance | ( | ) | [private] |
Méthode reprendreSeance() permettant de reprendre une séance actuellement en pause.
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonActionSeance, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTramePeripheriqueBluetoothEcran(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTramePeripheriqueBluetoothLanceur(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ETAT_SEANCE_DEMARREE, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.etatSeance, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_ECRAN_REPRISE_SEANCE, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_LANCEUR_REPRISE_SEANCE.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.actionnerSeance().
{ Log.d("IHMEcranPrincipal", "reprendreSeance()"); // Changer l'icône du bouton d'action boutonActionSeance.setImageResource(R.drawable.bouton_pause); envoyerTramePeripheriqueBluetoothEcran(TRAME_ECRAN_REPRISE_SEANCE); envoyerTramePeripheriqueBluetoothLanceur(TRAME_LANCEUR_REPRISE_SEANCE); etatSeance = ETAT_SEANCE_DEMARREE; }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.selectionnerZone | ( | final int | typeSelection, |
int | choixObjectif, | ||
int | choixRobot | ||
) | [private] |
Méthode selectionnerZone() affichant une boite de dialogue permettant de selectionner la zone du robot ou la zone de l'objectif.
typeSelection | |
choixObjectif | |
choixRobot |
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.idZonePrecedente, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.idZonePrecedenteObjectif, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.idZonePrecedenteRobot, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onClick(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.SELECTION_ZONE_OBJECTIF, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.SELECTION_ZONE_ROBOT, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.strZoneObjectif, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.strZoneRobot, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.zoneObjectif, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.zoneRobot.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.actionnerSeance(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onClick().
{ Log.d("IHMEcranPrincipal", "selectionnerZone()"); final AlertDialog.Builder selectionZone = new AlertDialog.Builder(this); LayoutInflater factory = LayoutInflater.from(this); final View selectionZoneView = factory.inflate(R.layout.zones, null); selectionZone.setView(selectionZoneView); List<Button> boutonsZone = new ArrayList<Button>(); Button btnZone1 = (Button)selectionZoneView.findViewById(R.id.case1); boutonsZone.add(btnZone1); Button btnZone2 = (Button)selectionZoneView.findViewById(R.id.case2); boutonsZone.add(btnZone2); Button btnZone3 = (Button)selectionZoneView.findViewById(R.id.case3); boutonsZone.add(btnZone3); Button btnZone4 = (Button)selectionZoneView.findViewById(R.id.case4); boutonsZone.add(btnZone4); Button btnZone5 = (Button)selectionZoneView.findViewById(R.id.case5); boutonsZone.add(btnZone5); Button btnZone6 = (Button)selectionZoneView.findViewById(R.id.case6); boutonsZone.add(btnZone6); Button btnZone7 = (Button)selectionZoneView.findViewById(R.id.case7); boutonsZone.add(btnZone7); Button btnZone8 = (Button)selectionZoneView.findViewById(R.id.case8); boutonsZone.add(btnZone8); Button btnZone9 = (Button)selectionZoneView.findViewById(R.id.case9); boutonsZone.add(btnZone9); if(choixObjectif > 0) { Button btnZone = boutonsZone.get(choixObjectif - 1); btnZone.setBackgroundResource(R.drawable.case_cible); } if(choixRobot > 0) { Button btnZone = boutonsZone.get(choixRobot - 1); btnZone.setBackgroundResource(R.drawable.case_robot); } for(int i = 0; i < 9; i++) { Button btnZone = boutonsZone.get(i); // Changer l'icône de fond du bouton si la zone correspondante est actuellement occupée par le robot ou l'objectif if((i + 1) == zoneRobot) // i + 1 étant le numéro de zone actuel btnZone.setBackgroundResource(R.drawable.case_robot); /*if((i + 1) == zoneObjectif) // i + 1 étant le numéro de zone actuel btnZone.setBackgroundResource(R.drawable.case_cible);*/ btnZone.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Button myButton = (Button)selectionZoneView.findViewById(v.getId()); int zoneActuelle = Integer.parseInt(myButton.getText().toString().substring(myButton.getText().toString().length() - 1)); switch (typeSelection) { case SELECTION_ZONE_OBJECTIF: idZonePrecedente = idZonePrecedenteObjectif; break; case SELECTION_ZONE_ROBOT: idZonePrecedente = idZonePrecedenteRobot; break; } if(idZonePrecedente != -1) { Button myButtonPrecedent = (Button)selectionZoneView.findViewById(idZonePrecedente); int numeroZonePrecedente = Integer.parseInt(myButtonPrecedent.getText().toString().substring(myButtonPrecedent.getText().toString().length() - 1)); switch(typeSelection) { case SELECTION_ZONE_OBJECTIF: if((v.getId() != idZonePrecedenteRobot) && (myButtonPrecedent.getId() != idZonePrecedenteRobot)) myButtonPrecedent.setBackgroundResource(R.drawable.case_libre); break; /*case SELECTION_ZONE_ROBOT: if(v.getId() != idZonePrecedenteObjectif) myButtonPrecedent.setBackgroundResource(R.drawable.case_libre); break;*/ default: myButtonPrecedent.setBackgroundResource(R.drawable.case_libre); break; } } switch (typeSelection) { case SELECTION_ZONE_OBJECTIF: if (v.getId() != idZonePrecedenteRobot) idZonePrecedenteObjectif = v.getId(); break; case SELECTION_ZONE_ROBOT: idZonePrecedenteRobot = v.getId(); break; } idZonePrecedente = v.getId(); if(typeSelection == SELECTION_ZONE_OBJECTIF) { // Vérifier si l'objectif ne tombe pas sur la zone du robot if(zoneActuelle != zoneRobot) { if (strZoneObjectif == myButton.getText().toString()) { myButton.setBackgroundResource(R.drawable.case_libre); strZoneObjectif = "ZONE 0"; } else { myButton.setBackgroundResource(R.drawable.case_cible); strZoneObjectif = myButton.getText().toString(); } Log.d("IHMEcranPrincipal", "Objectif : " + strZoneObjectif); } } else if(typeSelection == SELECTION_ZONE_ROBOT) { if (strZoneRobot == myButton.getText().toString()) { myButton.setBackgroundResource(R.drawable.case_libre); strZoneRobot = "ZONE 0"; } else { myButton.setBackgroundResource(R.drawable.case_robot); strZoneRobot = myButton.getText().toString(); } Log.d("IHMEcranPrincipal", "Robot : " + strZoneRobot); } } }); } if(typeSelection == SELECTION_ZONE_OBJECTIF) selectionZone.setTitle("Placer l'objectif"); if(typeSelection == SELECTION_ZONE_ROBOT) selectionZone.setTitle("Placer le robot"); selectionZone.setPositiveButton("Valider", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { if(typeSelection == SELECTION_ZONE_OBJECTIF) { Log.d("IHMEcranPrincipal", "Zone objectif validée : " + strZoneObjectif); zoneObjectif = Integer.parseInt(strZoneObjectif.substring(strZoneObjectif.length() - 1)); } else if(typeSelection == SELECTION_ZONE_ROBOT) { Log.d("IHMEcranPrincipal", "Zone robot validée : " + strZoneRobot); zoneRobot = Integer.parseInt(strZoneRobot.substring(strZoneRobot.length() - 1)); // Puis sélectionner l'objectif selectionnerZone(SELECTION_ZONE_OBJECTIF, 0, 0); } if (idZonePrecedente == -1) idZonePrecedente = 0; } }); selectionZone.setNegativeButton("Annuler", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { if(typeSelection == SELECTION_ZONE_OBJECTIF) { strZoneObjectif = ""; zoneObjectif = 0; } else if(typeSelection == SELECTION_ZONE_ROBOT) { strZoneRobot = ""; zoneRobot = 0; // Puis sélectionner l'objectif selectionnerZone(SELECTION_ZONE_OBJECTIF, 0, 0); } } }); selectionZone.show(); }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.traiterDonneesRecues | ( | String | nomAppareilSource, |
String | donnees | ||
) | [private] |
Méthode traiterDonneesRecues() permettant la traitement des données bluetooth reçues en fonction de l'appareil source de ces données.
nomAppareilSource | étant l'appareil duquel on reçoit les données |
donnees | étant les données reçues |
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.NOM_PERIPHERIQUE_BLUETOOTH_LANCEUR, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.NOM_PERIPHERIQUE_BLUETOOTH_TABLE, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.traiterDonneesRecuesLanceur(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.traiterDonneesRecuesTable().
{ Log.d("IHMEcranPrincipal", "traiterDonneesRecues()"); switch (nomAppareilSource) { case NOM_PERIPHERIQUE_BLUETOOTH_LANCEUR: traiterDonneesRecuesLanceur(donnees); break; case NOM_PERIPHERIQUE_BLUETOOTH_TABLE: traiterDonneesRecuesTable(donnees); break; default: break; } }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.traiterDonneesRecuesLanceur | ( | String | donnees | ) | [private] |
Méthode traiterDonneesRecuesLanceur() permettant le traitement des données reçues par le lanceur.
donnees | étant les données reçues |
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.traiterErreurRecueLanceur(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_ENTETE.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.traiterDonneesRecues().
{ Log.d("IHMEcranPrincipal", "traiterDonneesRecuesLanceur()"); List<String> donneeRecue = new ArrayList<String>(Arrays.asList(donnees.split(":"))); switch (donneeRecue.get(0)) { case TRAME_ENTETE: if(donneeRecue.get(1).contains("ERREUR")) traiterErreurRecueLanceur(donneeRecue.get(1)); break; default: Log.e("IHMEcranPrincipal", "traiterDonneesRecuesLanceur() : trame non reconnue !"); } }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.traiterDonneesRecuesTable | ( | String | donnees | ) | [private] |
Méthode traiterDonneesRecuesTable() permettant le traitement des données reçues par la table.
donnees | étant les données reçues |
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.calculerReussiteSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTramePeripheriqueBluetoothEcran(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.incrementerBallesJouees(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_ENTETE.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.traiterDonneesRecues().
{ Log.d("IHMEcranPrincipal", "traiterDonneesRecuesTable()"); List<String> donneeRecue = new ArrayList<String>(Arrays.asList(donnees.split(":"))); switch (donneeRecue.get(0)) { case TRAME_ENTETE: // Transferer la trame reçue à l'écran envoyerTramePeripheriqueBluetoothEcran(donnees); switch(donneeRecue.get(1)) { case "IMPACT": if(Integer.parseInt(donneeRecue.get(2)) != 0) // Si l'impacte a eu lieu sur une des 9 zones et non sur le côté du lanceur calculerReussiteSeance(Integer.parseInt(donneeRecue.get(2))); else incrementerBallesJouees(); break; case "FAUTE": calculerReussiteSeance(-1); } break; default: Log.e("IHMEcranPrincipal", "traiterDonneesRecuesTable() : trame non reconnue !"); } }
void com.ttpa.iris.ttpamobile.IHMEcranPrincipal.traiterErreurRecueLanceur | ( | String | erreur | ) | [private] |
Méthode traiterErreurRecueLanceur() permettant la gestion des erreurs en provenance du lanceur.
erreur | étant le code d'erreur reçu |
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.pauserSeance().
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.traiterDonneesRecuesLanceur().
{ Log.d("IHMEcranPrincipal", "traiterErreurRecueLanceur() code d'erreur : " + erreur); pauserSeance(); }
boolean com.ttpa.iris.ttpamobile.IHMEcranPrincipal.verifierConnexionAppareilsBluetoothRequis | ( | ) | [private] |
Méthode verifierConnexionAppareilsBluetoothRequis() vérifiant si les appareils Bluetooth nécessaires au bon déroulement d'une séance sont détectés et connectés, puis modifie l'IHM en conséquent.
Références com.ttpa.iris.ttpamobile.IHMEcranPrincipal.actualiserIHMAppareilsBluetooth(), com.ttpa.iris.ttpamobile.PeripheriqueBluetooth.estConnecte(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierIHMBluetoothInsuffisant(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierIHMBluetoothOperationnel(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierIHMBluetoothSuffisant(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.peripheriqueBluetoothEcran, com.ttpa.iris.ttpamobile.IHMEcranPrincipal.peripheriqueBluetoothLanceur, et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.peripheriqueBluetoothTable.
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onClick().
{ Log.d("IHMEcranPrincipal", "verifierConnexionAppareilsBluetoothRequis()"); boolean ecranEstDetecte = (peripheriqueBluetoothEcran!=null); boolean lanceurEstDetecte = (peripheriqueBluetoothLanceur != null); boolean tableEstDetectee = (peripheriqueBluetoothTable != null); boolean ecranEstConnecte = false; boolean lanceurEstConnecte = false; boolean tableEstConnectee = false; if(ecranEstDetecte) ecranEstConnecte = peripheriqueBluetoothEcran.estConnecte(); if(lanceurEstDetecte) lanceurEstConnecte = peripheriqueBluetoothLanceur.estConnecte(); if(tableEstDetectee) tableEstConnectee = peripheriqueBluetoothTable.estConnecte(); actualiserIHMAppareilsBluetooth(tableEstConnectee, lanceurEstConnecte, ecranEstConnecte); boolean appareilsTousConnectes = ecranEstConnecte && lanceurEstConnecte && tableEstConnectee; boolean aucunAppareilConnecte = !ecranEstConnecte && !lanceurEstConnecte && !tableEstConnectee; if(appareilsTousConnectes) // Si tous les appareils sont connectés { modifierIHMBluetoothOperationnel(); return true; } else if(aucunAppareilConnecte) // Si aucun appareil n'est connecté { modifierIHMBluetoothInsuffisant(); return false; } else { modifierIHMBluetoothSuffisant(); // Si au moins un appareil est connecté } return false; }
BluetoothAdapter com.ttpa.iris.ttpamobile.IHMEcranPrincipal.adaptateurBluetooth = null [private] |
int com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ballesJouees [private] |
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.calculerReussiteSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.demarrerSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameRepriseSeancePeripheriqueBluetoothLanceur(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.incrementerBallesJouees().
SeekBar com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionEffetBalles [private] |
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.affecterMembresIHM(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.appliquerParametresSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.arreterSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.demarrerSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierValeursParametresIHM(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.rendreBarresProgressionIHMUtilisables().
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.affecterMembresIHM(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.appliquerParametresSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.arreterSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.demarrerSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierValeursParametresIHM(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.rendreBarresProgressionIHMUtilisables().
SeekBar com.ttpa.iris.ttpamobile.IHMEcranPrincipal.barreProgressionNombreBalles [private] |
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.affecterMembresIHM(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.appliquerParametresSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.arreterSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.demarrerSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierValeursParametresIHM(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.rendreBarresProgressionIHMUtilisables().
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.affecterMembresIHM(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.appliquerParametresSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.arreterSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.demarrerSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierValeursParametresIHM(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.rendreBarresProgressionIHMUtilisables().
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.affecterMembresIHM(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.appliquerParametresSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.arreterSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.demarrerSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierValeursParametresIHM(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.rendreBarresProgressionIHMUtilisables().
ImageView com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonActionSeance [private] |
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.affecterMembresIHM(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.arreterSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.demarrerSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.incrementerBallesJouees(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierIHMBluetoothInsuffisant(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierIHMBluetoothOperationnel(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierIHMBluetoothSuffisant(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onClick(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.pauserSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.rendreBoutonsIHMCliquables(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.reprendreSeance().
ImageButton com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonAppliquerNomJoueur [private] |
ImageView com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonArreterSeance [private] |
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.affecterMembresIHM(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.arreterSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.demarrerSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onClick(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.rendreBoutonsIHMCliquables().
ImageButton com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonBluetooth [private] |
Ressources IHM
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.affecterMembresIHM(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierIHMBluetoothInsuffisant(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierIHMBluetoothOperationnel(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierIHMBluetoothSuffisant(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onClick(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.rendreBoutonsIHMCliquables().
ImageButton com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonHistorique [private] |
ImageButton com.ttpa.iris.ttpamobile.IHMEcranPrincipal.boutonParametres [private] |
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.affecterMembresIHM(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierIHMBluetoothInsuffisant(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierIHMBluetoothOperationnel(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.modifierIHMBluetoothSuffisant(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onClick(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.rendreBoutonsIHMCliquables().
final int com.ttpa.iris.ttpamobile.IHMEcranPrincipal.COULEUR_BOUTON_GRIS = Color.parseColor("#c0c5c6") [static, private] |
final int com.ttpa.iris.ttpamobile.IHMEcranPrincipal.COULEUR_BOUTON_ORANGE = Color.parseColor("#f7bb31") [static, private] |
final int com.ttpa.iris.ttpamobile.IHMEcranPrincipal.COULEUR_BOUTON_ROUGE = Color.parseColor("#ee5e5e") [static, private] |
final int com.ttpa.iris.ttpamobile.IHMEcranPrincipal.COULEUR_BOUTON_VERT = Color.parseColor("#5eed7b") [static, private] |
Set<BluetoothDevice> com.ttpa.iris.ttpamobile.IHMEcranPrincipal.devices [private] |
final int com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ETAT_SEANCE_ARRETEE = 0 [static, private] |
final int com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ETAT_SEANCE_DEMARREE = 1 [static, private] |
final int com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ETAT_SEANCE_PAUSE = 2 [static, private] |
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.actionnerSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.appliquerParametresSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.arreterSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.calculerReussiteSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.creerListeJoueurs(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.incrementerBallesJouees(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.pauserSeance(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.reprendreSeance().
final Handler com.ttpa.iris.ttpamobile.IHMEcranPrincipal.handler [private] |
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.connexionPeripheriqueBluetoothEcran(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.connexionPeripheriqueBluetoothLanceur(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.connexionPeripheriqueBluetoothTable(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.connexionPeripheriquesBluetooth().
int com.ttpa.iris.ttpamobile.IHMEcranPrincipal.idZonePrecedente = -1 [package] |
int com.ttpa.iris.ttpamobile.IHMEcranPrincipal.idZonePrecedenteObjectif = -1 [package] |
int com.ttpa.iris.ttpamobile.IHMEcranPrincipal.idZonePrecedenteRobot = -1 [package] |
final String com.ttpa.iris.ttpamobile.IHMEcranPrincipal.NOM_PERIPHERIQUE_BLUETOOTH_ECRAN = "TTPA-Ecran" [static, private] |
final String com.ttpa.iris.ttpamobile.IHMEcranPrincipal.NOM_PERIPHERIQUE_BLUETOOTH_LANCEUR = "TTPA-Lanceur" [static, private] |
final String com.ttpa.iris.ttpamobile.IHMEcranPrincipal.NOM_PERIPHERIQUE_BLUETOOTH_TABLE = "TTPA-Table" [static, private] |
String com.ttpa.iris.ttpamobile.IHMEcranPrincipal.nomJoueur [private] |
ParametreSeance com.ttpa.iris.ttpamobile.IHMEcranPrincipal.parametresActuels = new ParametreSeance() |
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.appliquerParametresSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.creerListeJoueurs(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.demarrerSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameConnexionPeripheriqueBluetoothEcran(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameDebutSeancePeripheriqueBluetoothLanceur(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameParametrageSeancePeripheriqueBluetoothEcran(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameRepriseSeancePeripheriqueBluetoothLanceur(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.onClick().
PeripheriqueBluetooth com.ttpa.iris.ttpamobile.IHMEcranPrincipal.peripheriqueBluetoothEcran = null [package] |
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.connexionPeripheriqueBluetoothEcran(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.deconnexionPeripheriquesBluetooth(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTramePeripheriqueBluetoothEcran(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.verifierConnexionAppareilsBluetoothRequis().
PeripheriqueBluetooth com.ttpa.iris.ttpamobile.IHMEcranPrincipal.peripheriqueBluetoothLanceur = null [package] |
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.connexionPeripheriqueBluetoothLanceur(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.deconnexionPeripheriquesBluetooth(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameArretPeripheriqueBluetoothLanceur(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameDebutSeancePeripheriqueBluetoothLanceur(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTramePeripheriqueBluetoothLanceur(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameRepriseSeancePeripheriqueBluetoothLanceur(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.verifierConnexionAppareilsBluetoothRequis().
PeripheriqueBluetooth com.ttpa.iris.ttpamobile.IHMEcranPrincipal.peripheriqueBluetoothTable = null [package] |
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.connexionPeripheriqueBluetoothTable(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.deconnexionPeripheriquesBluetooth(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameArretPeripheriqueBluetoothTable(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.verifierConnexionAppareilsBluetoothRequis().
final int com.ttpa.iris.ttpamobile.IHMEcranPrincipal.REQUEST_CODE_ENABLE_BLUETOOTH = 0 [static, private] |
final int com.ttpa.iris.ttpamobile.IHMEcranPrincipal.SELECTION_ZONE_OBJECTIF = 0 [static, private] |
Gestion des zones
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.selectionnerZone().
final int com.ttpa.iris.ttpamobile.IHMEcranPrincipal.SELECTION_ZONE_ROBOT = 1 [static, private] |
Attributs de la classe
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.ajouterJoueur(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.arreterSeance(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.connexionBaseDeDonnees(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.creerListeJoueurs(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.demarrerSeance().
Spinner com.ttpa.iris.ttpamobile.IHMEcranPrincipal.spinnerListeJoueurs [private] |
String com.ttpa.iris.ttpamobile.IHMEcranPrincipal.strZoneObjectif = new String("ZONE 0") [package] |
String com.ttpa.iris.ttpamobile.IHMEcranPrincipal.strZoneRobot = new String("ZONE 0") [package] |
TextView com.ttpa.iris.ttpamobile.IHMEcranPrincipal.texteValeurEffetBalles [private] |
TextView com.ttpa.iris.ttpamobile.IHMEcranPrincipal.texteValeurFrequenceBalles [private] |
TextView com.ttpa.iris.ttpamobile.IHMEcranPrincipal.texteValeurNombreBalles [private] |
TextView com.ttpa.iris.ttpamobile.IHMEcranPrincipal.texteValeurPuissanceBalles [private] |
TextView com.ttpa.iris.ttpamobile.IHMEcranPrincipal.texteValeurRotationLanceur [private] |
final String com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_ECRAN_DEBUT_SEANCE = ":START" [static, private] |
final String com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_ECRAN_FIN_SEANCE = ":FINSEANCE" [static, private] |
final String com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_ECRAN_PAUSE_SEANCE = ":PAUSE" [static, private] |
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.pauserSeance().
final String com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_ECRAN_REPRISE_SEANCE = ":RESUME" [static, private] |
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.reprendreSeance().
final String com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_ENTETE = "$TTPA" [static, private] |
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameConnexionPeripheriqueBluetoothEcran(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameDebutSeancePeripheriqueBluetoothLanceur(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameParametrageSeancePeripheriqueBluetoothEcran(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.envoyerTrameRepriseSeancePeripheriqueBluetoothLanceur(), com.ttpa.iris.ttpamobile.IHMEcranPrincipal.traiterDonneesRecuesLanceur(), et com.ttpa.iris.ttpamobile.IHMEcranPrincipal.traiterDonneesRecuesTable().
final String com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_FIN = "\r\n" [static, private] |
final String com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_LANCEUR_ARRET_SEANCE = ":STOP:" + TRAME_FIN [static, private] |
final String com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_LANCEUR_PAUSE_SEANCE = ":PAUSE:" + TRAME_FIN [static, private] |
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.pauserSeance().
final String com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_LANCEUR_PING = ":PING:" + TRAME_FIN [static, private] |
final String com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_LANCEUR_REPRISE_SEANCE = ":RESUME:" + TRAME_FIN [static, private] |
Référencé par com.ttpa.iris.ttpamobile.IHMEcranPrincipal.reprendreSeance().
final String com.ttpa.iris.ttpamobile.IHMEcranPrincipal.TRAME_TABLE_ARRET_SEANCE = ":RESET" [static, private] |
ImageView com.ttpa.iris.ttpamobile.IHMEcranPrincipal.voyantEcran [private] |
ImageView com.ttpa.iris.ttpamobile.IHMEcranPrincipal.voyantLanceur [private] |
ImageView com.ttpa.iris.ttpamobile.IHMEcranPrincipal.voyantTable [private] |
int com.ttpa.iris.ttpamobile.IHMEcranPrincipal.zoneObjectif = 0 [package] |
int com.ttpa.iris.ttpamobile.IHMEcranPrincipal.zoneRobot = 0 [package] |