@@ -708,42 +708,21 @@ void test_reportToMapDefaultImprecise(void)
708
708
TEST_ASSERT_EQUAL (1 , pubsub->published_ .size ());
709
709
const auto &[topic, payload] = pubsub->published_ .front ();
710
710
TEST_ASSERT_EQUAL_STRING (" msh/2/map/" , topic.c_str ());
711
- verifyLatLong (std::get<DecodedServiceEnvelope>(payload), 70123520 , 30015488 );
712
- }
713
-
714
- // Precise location is reported when configured.
715
- void test_reportToMapPrecise (void )
716
- {
717
- unitTest->reportToMap (/* precision=*/ 32 );
718
-
719
- TEST_ASSERT_EQUAL (1 , pubsub->published_ .size ());
720
- const auto &[topic, payload] = pubsub->published_ .front ();
721
- TEST_ASSERT_EQUAL_STRING (" msh/2/map/" , topic.c_str ());
722
- verifyLatLong (std::get<DecodedServiceEnvelope>(payload), localPosition.latitude_i , localPosition.longitude_i );
723
711
}
724
712
725
713
// Location is sent over the phone proxy.
726
- void test_reportToMapPreciseProxied (void )
714
+ void test_reportToMapImpreciseProxied (void )
727
715
{
728
716
moduleConfig.mqtt .proxy_to_client_enabled = true ;
729
717
MQTTUnitTest::restart ();
730
718
731
- unitTest->reportToMap (/* precision=*/ 32 );
719
+ unitTest->reportToMap (/* precision=*/ 14 );
732
720
733
721
TEST_ASSERT_EQUAL (1 , mockMeshService->messages_ .size ());
734
722
const meshtastic_MqttClientProxyMessage &message = mockMeshService->messages_ .front ();
735
723
TEST_ASSERT_EQUAL_STRING (" msh/2/map/" , message.topic );
736
724
TEST_ASSERT_EQUAL (meshtastic_MqttClientProxyMessage_data_tag, message.which_payload_variant );
737
725
const DecodedServiceEnvelope env (message.payload_variant .data .bytes , message.payload_variant .data .size );
738
- verifyLatLong (env, localPosition.latitude_i , localPosition.longitude_i );
739
- }
740
-
741
- // No location is reported when the precision is invalid.
742
- void test_reportToMapInvalidPrecision (void )
743
- {
744
- unitTest->reportToMap (/* precision=*/ 0 );
745
-
746
- TEST_ASSERT_TRUE (pubsub->published_ .empty ());
747
726
}
748
727
749
728
// isUsingDefaultServer returns true when using the default server.
@@ -920,9 +899,7 @@ void setup()
920
899
RUN_TEST (test_publishTextMessageDirect);
921
900
RUN_TEST (test_publishTextMessageWithProxy);
922
901
RUN_TEST (test_reportToMapDefaultImprecise);
923
- RUN_TEST (test_reportToMapPrecise);
924
- RUN_TEST (test_reportToMapPreciseProxied);
925
- RUN_TEST (test_reportToMapInvalidPrecision);
902
+ RUN_TEST (test_reportToMapImpreciseProxied);
926
903
RUN_TEST (test_usingDefaultServer);
927
904
RUN_TEST (test_usingDefaultServerWithPort);
928
905
RUN_TEST (test_usingDefaultServerWithInvalidPort);
0 commit comments