Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

XML: G1000 Remote Control Head

Featured Replies

  • Moderator

I'm trying to script a remote control keypad/panel for a G1000.

 

All of the edge buttons and most of the knobs on the MFD have been moved to the remote control unit, so I need an (easy?) way to accomplish my goal.

 

Unfortunately, because of the absolute horror of all the inter-dependent @macros it is becoming a bit of a nightmare.

 

I was doing fine until I got the the ENT button. In the remote unit's <Mouse> section, I have the following script:

	<!-- =========================== ENTER Button ========================================= -->
<Area Name="ENT Button" Left="170" Top="106" Width="34" Height="25">
  <Click Kind="LeftSingle+Leave">
	(M:Event) 'LeftSingle' scmp 0 == if{ 2 (>L:RmtENT,enum) }
	(M:Event) 'Leave' scmp 0 == if{ 1 (>L:RmtENT,enum) }
  </Click>
  <Cursor Type="Hand"/>
  <Tooltip>GPS_ENTER_BUTTON</Tooltip>
</Area>

As you can see, left clicking on the button sets (L:RmtENT,enum) = 2 and releasing the button (either release/leave) will set (L:RmtENT,enum) = 1.

 

In the G1000_MFD, I'm capturing the remote buttons in the <Update> section:

(L:RmtENT,enum) 2 == (@g:entButtonDown) 0 == and if{ 1 (>@g:entButtonDown) @ENTButton }
(L:RmtENT,enum) 1 == (@g:entButtonDown) 1 == and if{ 0 (>@g:entButtonDown) 0 (>L:RmtENT,enum) }

All this does is replicate the original <Click> section. When (L:RmtENT,enum) is 2, the @ENTButton macro is loaded. When (L:RmtENT,enum) is 1 (button released), (L:RmtENT,enum) is set to 0 to prevent the script from firing again.

 

So far, so good. The problem comes when I try to place the @ENTButton macro with the rest of the @macros at the top (above the <Update> section. Apparently there are some calculations that are dependent on having had the <Update> section run first, as the gauge will instantly CRASH... :Black Eye:

 

If I move the @ENTButton macro below the <Update> section the gauge will load and run without crashing, but the script will not execute properly...

 

Does anyone know of a "easier" way to do this?

 

 

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Hi,

 

I would not use the update, but something like:

 

 

<Macro Name="ENTButton"> "ENTER SCRIPT" </Macro>

<Area Name="ENT Button" Left="170" Top="106" Width="34" Height="25">		
<Click Kind="LeftSingle+Leave">
(M:Event) 'LeftSingle' scmp 0 ==
if{
(L:RmtENT,enum) 0 == if{ 1 (>L:RmtENT,enum) 1 (>@g:entButtonDown) @ENTButton }
}
(M:Event) 'Leave' scmp 0 ==
if{ 0 (>L:RmtENT,enum) 0 (>@g:entButtonDown) }
</Click>
<Cursor Type="Hand"/>
<Tooltip>GPS_ENTER_BUTTON</Tooltip>
</Area>

Jan

 

 

 

"Beatus ille qui procul negotiis..."

  • Author
  • Moderator

Um, Jan...

 

The @macro(s) and the <Mouse> scripts are not in the same gauge...

 

...that's why I said it is a "remote control keypad/panel..."

 

...and is why I have to use custom (L:vars) to trigger the mouse events in the remote G1000 gauge.

 

Gaaah!!! Now here another silly problem. When both of the following are active, the sim crashes with an AppHang error. Comment out either one and the gauge runs fine.

(L:RmtTopRightKnob,bool) if{ 0 (>L:RmtTopRightKnob,bool) @TopRightKnob }
(L:RmtTopLeftKnob,bool) if{ 0 (>L:RmtTopLeftKnob,bool) @TopLeftKnob }

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Fr. Bill,

 

Quote -

"Unfortunately, because of the absolute horror of all the inter-dependent @macros it is becoming a bit of a nightmare.

Apparently there are some calculations that are dependent on having had the <Update> section run first, as the gauge will instantly CRASH..."

 

Yep.. "Isn't there a giant headache smily?" The order of <Macro>'s lists & <Update> in code DO make a difference in higher logical situations.

 

Haven't pulled apart the G1000 at all, well maybe a little. I do believe your problem may be

 

(@g:entButtonDown)

 

Just a hunch - I do believe that this macro is only for the visual aspect of the buttons with an added "do stuff" call, AND the macro itself is embedded inside the <Mickey Mouse> section. So calling it externally would never work since the Disneyland section is not active cause your Mickey Mouse isn't there. ( True in the FS9 GPS )

 

Instead on your communication L:Var call maybe just , "@ENTButton" instead on the receiving side.

 

Even better - Just use the stock (SO CALLED, provided by SDK.chm) events - C- KEY_GPS_ENTER_BUTTON or >K:GPS_ENTER_BUTTON - never tested..

 

All hunches, looks good! A little Cirrus work? That system is the bomb!

 

Roman

20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

I did have the same problems with PFD, ND, FMC and Systems.

That is why i put all code, macros, updates etc. in the FMC ("FCC 1, 2 and 3")

and steer the rest of the plane with L:vars; @g:etc. are not necessary.

Jan

 

 

 

"Beatus ille qui procul negotiis..."

  • Author
  • Moderator

Haven't pulled apart the G1000 at all, well maybe a little. I do believe your problem may be

 

(@g:entButtonDown)

 

Just a hunch - I do believe that this macro is only for the visual aspect of the buttons with an added "do stuff" call, AND the macro itself is embedded inside the <Mickey Mouse> section. So calling it externally would never work since the Disneyland section is not active cause your Mickey Mouse isn't there. ( True in the FS9 GPS )

 

Instead on your communication L:Var call maybe just , "@ENTButton" instead on the receiving side.

 

Even better - Just use the stock (SO CALLED, provided by SDK.chm) events - C- KEY_GPS_ENTER_BUTTON or >K:GPS_ENTER_BUTTON - never tested..

 

All hunches, looks good! A little Cirrus work? That system is the bomb!

 

Yes, this is for the Cirrus SR22G3T Perspective. My G1000 is based on a rearrangement/adaptation of the FS9 default G500.xml script since it has to be compatible with both FS9 and FSX. All of the essential mouse scripts are identical. Also yes, the (@g:entButtonDown) command is strictly used for "animating" the 2d button.

 

For whatever reason I didn't even think of trying the custom key_events! I'll give that a go after I've restored my G1000_MFD.xml back to it's original working version. I've done far too much rearranging of script by now, so I should start with a clean slate... :LMAO:

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author
  • Moderator

Well, now I feel like a right fool! I used the G1000_MFD_keyevents and they work just fine, thank you very much...

 

...although I may still have to use the GPS_keyevents for FS9 compatibility. I can simply remove the <Key> event list from the PFD so it won't respond to the remote's signals. :)

 

Now I get to tackle the chore of scripting the alpha-numeric keypad. Oh joy! :LMAO:

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Commercial Member

Now I get to tackle the chore of scripting the alpha-numeric keypad. Oh joy! :LMAO:

 

Perhaps my code may be of assistance:

 

 <!--==================================SCRATCH-PAD==================================-->
 <!--==================================SCRATCH-PAD==================================-->
 <!--==================================SCRATCH-PAD==================================-->
 <!--==================================SCRATCH-PAD==================================-->
 <!--==================================SCRATCH-PAD==================================-->
<Area Left="155" Right="180" Top="345" Bottom="370">
<Tooltip>A</Tooltip>
<Cursor Type="Hand"/>
<Click>
  (L:FMC-UNIT-1,number) 0 == if{ 65 (>L:FMC-UNIT-1,number) }
els{ (L:FMC-UNIT-1,number) (L:FMC-UNIT-2,number) > (L:FMC-UNIT-2,number) 0 == and if{ 65 (>L:FMC-UNIT-2,number) }
els{ (L:FMC-UNIT-2,number) (L:FMC-UNIT-3,number) > (L:FMC-UNIT-3,number) 0 == and if{ 65 (>L:FMC-UNIT-3,number) }
els{ (L:FMC-UNIT-3,number) (L:FMC-UNIT-4,number) > (L:FMC-UNIT-4,number) 0 == and if{ 65 (>L:FMC-UNIT-4,number) }
els{ (L:FMC-UNIT-4,number) (L:FMC-UNIT-5,number) > (L:FMC-UNIT-5,number) 0 == and if{ 65 (>L:FMC-UNIT-5,number) }
els{ (L:FMC-UNIT-5,number) (L:FMC-UNIT-6,number) > (L:FMC-UNIT-6,number) 0 == and if{ 65 (>L:FMC-UNIT-6,number) }
els{ (L:FMC-UNIT-6,number) (L:FMC-UNIT-7,number) > (L:FMC-UNIT-7,number) 0 == and if{ 65 (>L:FMC-UNIT-7,number) }
els{ (L:FMC-UNIT-7,number) (L:FMC-UNIT-8,number) > (L:FMC-UNIT-8,number) 0 == and if{ 65 (>L:FMC-UNIT-8,number) }
els{ (L:FMC-UNIT-8,number) (L:FMC-UNIT-9,number) > (L:FMC-UNIT-9,number) 0 == and if{ 65 (>L:FMC-UNIT-9,number) }
els{ (L:FMC-UNIT-9,number) (L:FMC-UNIT-10,number) > (L:FMC-UNIT-10,number) 0 == and if{ 65 (>L:FMC-UNIT-10,number) }
els{ (L:FMC-UNIT-10,number) (L:FMC-UNIT-11,number) > (L:FMC-UNIT-11,number) 0 == and if{ 65 (>L:FMC-UNIT-11,number) }
els{ (L:FMC-UNIT-11,number) (L:FMC-UNIT-12,number) > (L:FMC-UNIT-12,number) 0 == and if{ 65 (>L:FMC-UNIT-12,number) }
els{ (L:FMC-UNIT-12,number) (L:FMC-UNIT-13,number) > (L:FMC-UNIT-13,number) 0 == and if{ 65 (>L:FMC-UNIT-13,number) }
els{ (L:FMC-UNIT-13,number) (L:FMC-UNIT-14,number) > (L:FMC-UNIT-14,number) 0 == and if{ 65 (>L:FMC-UNIT-14,number) }
els{ (L:FMC-UNIT-14,number) (L:FMC-UNIT-15,number) > (L:FMC-UNIT-15,number) 0 == and if{ 65 (>L:FMC-UNIT-15,number) }
els{ (L:FMC-UNIT-15,number) (L:FMC-UNIT-16,number) > (L:FMC-UNIT-16,number) 0 == and if{ 65 (>L:FMC-UNIT-16,number) }
els{ (L:FMC-UNIT-16,number) (L:FMC-UNIT-17,number) > (L:FMC-UNIT-17,number) 0 == and if{ 65 (>L:FMC-UNIT-17,number) }
els{ (L:FMC-UNIT-17,number) (L:FMC-UNIT-18,number) > (L:FMC-UNIT-18,number) 0 == and if{ 65 (>L:FMC-UNIT-18,number) }
els{ (L:FMC-UNIT-18,number) (L:FMC-UNIT-19,number) > (L:FMC-UNIT-19,number) 0 == and if{ 65 (>L:FMC-UNIT-19,number) }
els{ (L:FMC-UNIT-19,number) (L:FMC-UNIT-20,number) > (L:FMC-UNIT-20,number) 0 == and if{ 65 (>L:FMC-UNIT-20,number) }
els{ (L:FMC-UNIT-20,number) (L:FMC-UNIT-21,number) > (L:FMC-UNIT-21,number) 0 == and if{ 65 (>L:FMC-UNIT-21,number) }
els{ (L:FMC-UNIT-21,number) (L:FMC-UNIT-22,number) > (L:FMC-UNIT-22,number) 0 == and if{ 65 (>L:FMC-UNIT-22,number) }
els{ (L:FMC-UNIT-22,number) (L:FMC-UNIT-23,number) > (L:FMC-UNIT-23,number) 0 == and if{ 65 (>L:FMC-UNIT-23,number) }
els{ (L:FMC-UNIT-23,number) (L:FMC-UNIT-24,number) > (L:FMC-UNIT-24,number) 0 == and if{ 65 (>L:FMC-UNIT-24,number) }
} } } } } } } } } } } } } } } } } } } } } } }
</Click>
</Area>

 

OR

 

<On Key="AlphaNumeric">
<Visible>(L:FMC-KEYBOARD-USE,bool) 1 ==</Visible>
  (L:FMC-UNIT-1,number) 0 == if{ (M:Key) (>L:FMC-UNIT-1,number) }
els{ (L:FMC-UNIT-1,number) (L:FMC-UNIT-2,number) > (L:FMC-UNIT-2,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-2,number) }
els{ (L:FMC-UNIT-2,number) (L:FMC-UNIT-3,number) > (L:FMC-UNIT-3,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-3,number) }
els{ (L:FMC-UNIT-3,number) (L:FMC-UNIT-4,number) > (L:FMC-UNIT-4,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-4,number) }
els{ (L:FMC-UNIT-4,number) (L:FMC-UNIT-5,number) > (L:FMC-UNIT-5,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-5,number) }
els{ (L:FMC-UNIT-5,number) (L:FMC-UNIT-6,number) > (L:FMC-UNIT-6,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-6,number) }
els{ (L:FMC-UNIT-6,number) (L:FMC-UNIT-7,number) > (L:FMC-UNIT-7,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-7,number) }
els{ (L:FMC-UNIT-7,number) (L:FMC-UNIT-8,number) > (L:FMC-UNIT-8,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-8,number) }
els{ (L:FMC-UNIT-8,number) (L:FMC-UNIT-9,number) > (L:FMC-UNIT-9,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-9,number) }
els{ (L:FMC-UNIT-9,number) (L:FMC-UNIT-10,number) > (L:FMC-UNIT-10,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-10,number) }
els{ (L:FMC-UNIT-10,number) (L:FMC-UNIT-11,number) > (L:FMC-UNIT-11,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-11,number) }
els{ (L:FMC-UNIT-11,number) (L:FMC-UNIT-12,number) > (L:FMC-UNIT-12,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-12,number) }
els{ (L:FMC-UNIT-12,number) (L:FMC-UNIT-13,number) > (L:FMC-UNIT-13,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-13,number) }
els{ (L:FMC-UNIT-13,number) (L:FMC-UNIT-14,number) > (L:FMC-UNIT-14,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-14,number) }
els{ (L:FMC-UNIT-14,number) (L:FMC-UNIT-15,number) > (L:FMC-UNIT-15,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-15,number) }
els{ (L:FMC-UNIT-15,number) (L:FMC-UNIT-16,number) > (L:FMC-UNIT-16,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-16,number) }
els{ (L:FMC-UNIT-16,number) (L:FMC-UNIT-17,number) > (L:FMC-UNIT-17,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-17,number) }
els{ (L:FMC-UNIT-17,number) (L:FMC-UNIT-18,number) > (L:FMC-UNIT-18,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-18,number) }
els{ (L:FMC-UNIT-18,number) (L:FMC-UNIT-19,number) > (L:FMC-UNIT-19,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-19,number) }
els{ (L:FMC-UNIT-19,number) (L:FMC-UNIT-20,number) > (L:FMC-UNIT-20,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-20,number) }
els{ (L:FMC-UNIT-20,number) (L:FMC-UNIT-21,number) > (L:FMC-UNIT-21,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-21,number) }
els{ (L:FMC-UNIT-21,number) (L:FMC-UNIT-22,number) > (L:FMC-UNIT-22,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-22,number) }
els{ (L:FMC-UNIT-22,number) (L:FMC-UNIT-23,number) > (L:FMC-UNIT-23,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-23,number) }
els{ (L:FMC-UNIT-23,number) (L:FMC-UNIT-24,number) > (L:FMC-UNIT-24,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-24,number) }
} } } } } } } } } } } } } } } } } } } } } } }
</On>

 

DISPLAY:

 

<Element Name="TEXT-FIELD">
<Position X="050" Y="235"/>
<Visible>(L:FMC-MSG-UNIT-1,number) 0 == (L:FMC-WPT-SEL,enum) 0 == and</Visible>
<FormattedText X="280" Y="230" Bright="Yes" Font="Calibri" FontSize="15" Adjust="Left"
Color="%( (L:FMC-BRT,number) 0x7f + 0x100 * )%"  LineSpacing="15" Tabs="15,25L,120C,265R,270R">
<String>%(
(L:FMC-UNIT-1,number) chr (L:FMC-UNIT-2,number) chr (L:FMC-UNIT-3,number) chr (L:FMC-UNIT-4,number) chr
(L:FMC-UNIT-5,number) chr (L:FMC-UNIT-6,number) chr (L:FMC-UNIT-7,number) chr (L:FMC-UNIT-8,number) chr
(L:FMC-UNIT-9,number) chr (L:FMC-UNIT-10,number) chr (L:FMC-UNIT-11,number) chr (L:FMC-UNIT-12,number) chr (L:FMC-UNIT-13,number) chr (L:FMC-UNIT-14,number) chr (L:FMC-UNIT-15,number) chr (L:FMC-UNIT-16,number) chr (L:FMC-UNIT-17,number) chr (L:FMC-UNIT-18,number) chr (L:FMC-UNIT-19,number) chr (L:FMC-UNIT-20,number) chr (L:FMC-UNIT-21,number) chr (L:FMC-UNIT-22,number) chr (L:FMC-UNIT-23,number) chr (L:FMC-UNIT-24,number) chr
scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat)%!s!
</String>
</FormattedText>
</Element>

 

Hope this helps you Bill.

Good Day,

Engjell Berisha

 

Angel-Simulations-Small.png

  • Author
  • Moderator

Thanks for the idea, Engjell! Much appreciated. However, since I only need to generate a unique command for each of the letters, numbers, and symbols required, I was able to use a simpler approach.

 

There are already defined areas on the G1000 MFD for data entry/display, so all I needed to do was pass the button click from the REMOTE UNIT to the G1000 MFD for processing.

 

<Area Name="BUTTON A" Left="115" Top="158" Width="33" Height="23">
  <Cursor Type="Hand"/>
  <Click>
	1 (>L:Key_A,bool)
	1 (>L:XMLClick,enum)
  </Click>
</Area>

 

In the G1000 MFD in the <Update> section, I check for each unique button, then pass the K:event required. To keep down the typing, I also scripted a @Macro. Since the number pad key may be used for FMS, XPDR, COM and NAV, I need to evaluate the key inputs and take appropriate actions based on the REMOTE UNIT's FUNC condition:

 

<Macro Name="SendKey">(>C:fs9gps:IcaoSearchEnterChar)</Macro>

<!== DETECT KEYPAD AND EVALUATE ==>			
<Update>
(L:Key_A,bool)	if{ 0 (>L:Key_A,bool) 'A' @SendKey }
(L:Key_B,bool)	if{ 0 (>L:Key_B,bool) 'B' @SendKey }

(L:Key_Z,bool)	if{ 0 (>L:Key_Z,bool) 'Z' @SendKey }
(L:Key_SP,bool)   if{ 0 (>L:Key_SP,bool) 1 (>@c:IcaoSearchAdvanceCursor) }
(L:Key_BKSP,bool) if{ 0 (>L:Key_BKSP,bool) -1 (>@c:IcaoSearchAdvanceCursor) }

<!== DETECT NUMPAD AND EVALUATE BASED ON REMOTE'S FUNCTION ==>

<!== IF FUNCTION SET FOR FMS DATA ENTRY ==>
(L:RmtFUNC,enum) 0 == if{
		  (L:Key_1,bool)	  if{ 0 (>L:Key_1,bool) '1' @SendKey }
		  (L:Key_2,bool)	  if{ 0 (>L:Key_2,bool) '2' @SendKey }
		  (L:Key_3,bool)	  if{ 0 (>L:Key_3,bool) '3' @SendKey }
		  (L:Key_4,bool)	  if{ 0 (>L:Key_4,bool) '4' @SendKey }
		  (L:Key_5,bool)	  if{ 0 (>L:Key_5,bool) '5' @SendKey }
		  (L:Key_6,bool)	  if{ 0 (>L:Key_6,bool) '6' @SendKey }
		  (L:Key_7,bool)	  if{ 0 (>L:Key_7,bool) '7' @SendKey }
		  (L:Key_8,bool)	  if{ 0 (>L:Key_8,bool) '8' @SendKey }
		  (L:Key_9,bool)	  if{ 0 (>L:Key_9,bool) '9' @SendKey }
		  (L:Key_0,bool)	  if{ 0 (>L:Key_0,bool) '0' @SendKey }
		  (L:Key_dec,bool)	  if{ 0 (>L:Key_dec,bool) '.' @SendKey }
		  (L:Key_plus,bool)	  if{ 0 (>L:Key_plus,bool) '+' @SendKey }
		  (L:Key_minus,bool)	  if{ 0 (>L:Key_minus,bool) '-' @SendKey }
	 }

<!== IF FUNCTION IS SET FOR XPDR CODE ==>
(L:RmtFUNC,enum) 1 == if{
	  (L:Key_1,bool) if{
			   0 (>L:Key_1,bool)
			   (L:G1000_Cursor,enum) 1 + 6 min (>L:G1000_Cursor,enum)
			   (L:G1000_Cursor,enum) 1 == if{ 2 (>L:G1000_Cursor,enum) }
			   (L:G1000_Cursor,enum) 1 == if{ 0 (>L:Digit1,enum) }
			   (L:G1000_Cursor,enum) 2 == if{ 1 (>L:Digit1,enum) }
			   (L:G1000_Cursor,enum) 3 == if{ 1 (>L:Digit2,enum) }
			   (L:G1000_Cursor,enum) 4 == if{ 1 (>L:Digit3,enum) }
			   (L:G1000_Cursor,enum) 5 == if{ 1 (>L:Digit4,enum) }
		   }
			et cetera through (L:Key_0,bool)
	}
</Update

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.